本文整理了Java中org.geotools.xml.XSD
类的一些代码示例,展示了XSD
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSD
类的具体详情如下:
包路径:org.geotools.xml.XSD
类名称:XSD
[英]Xml Schema for a particular namespace.
This class should is subclasses for the xs, gml, filter, sld, etc... schemas. Subclasses should be implemented as singletons.
[中]特定名称空间的Xml模式。
这个类应该是xs、gml、filter、sld等的子类。。。模式。子类应该作为单例实现。
代码示例来源:origin: org.geotools/gt2-xml-core
/**
* Returns the XSD object representing the contents of the schema.
*/
public final XSDSchema getSchema() throws IOException {
if (schema == null) {
synchronized (this) {
if (schema == null) {
LOGGER.fine("building schema for schema: " + getNamespaceURI());
schema = buildSchema();
}
}
}
return schema;
}
代码示例来源:origin: org.geotools.xsd/gt-core
/**
* Returns the url to the file definiing hte schema.
* <p>
* For schema which are defined by multiple files, this method should return the base schema
* which includes all other files that define the schema.
* </p>
* @deprecated use {@link XSD#getSchemaLocation()}.
*/
public final String getSchemaFileURL() {
return getXSD().getSchemaLocation();
}
代码示例来源:origin: org.geotools.xsd/gt-core
protected List allDependencies() {
LinkedList unpacked = new LinkedList();
Stack stack = new Stack();
stack.addAll(getDependencies());
while (!stack.isEmpty()) {
XSD xsd = (XSD) stack.pop();
if (!unpacked.contains(xsd)) {
unpacked.addFirst(xsd);
stack.addAll(xsd.getDependencies());
}
}
return unpacked;
}
代码示例来源:origin: org.geotools/gt2-xml-core
/**
* Creates the schema, returning <code>null</code> if the schema could not be created.
* </p>
* <code>namespaceURI</code> should not be <code>null</code>. All other parameters are ignored.
*
* @see XSDSchemaLocator#locateSchema(org.eclipse.xsd.XSDSchema, java.lang.String, java.lang.String, java.lang.String)
*/
public XSDSchema locateSchema(XSDSchema schema, String namespaceURI,
String rawSchemaLocationURI, String resolvedSchemaLocationURI) {
if (xsd.getNamespaceURI().equals(namespaceURI)) {
try {
return xsd.getSchema();
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Error occured getting schema", e);
}
}
return null;
}
代码示例来源:origin: org.geotools.xsd/gt-core
context = configuration.setupContext(context);
Map bindings = configuration.setupBindings();
BindingLoader bindingLoader = new BindingLoader(bindings);
for (Iterator d = configuration.getXSD().getDependencies().iterator(); d.hasNext();) {
XSD xsd = (XSD) d.next();
XSDSchema schema = xsd.getSchema();
mappings.putAll(configuration.getXSD().getSchema().getQNamePrefixToNamespaceMap());
} catch (IOException e) {
throw new RuntimeException(e);
代码示例来源:origin: org.geotools.xsd/gt-core
logger.finer( "No schemaLocation found, using '" + config.getNamespaceURI() + " " + config.getSchemaFileURL() );
locations = new String[] { config.getNamespaceURI(), config.getSchemaFileURL() };
schemas = new XSDSchema[] { config.getXSD().getSchema() };
} catch (IOException e) {
throw (SAXException) new SAXException().initCause(e);
代码示例来源:origin: org.geotools/gt2-xml-core
/**
* Builds the schema from the .xsd file specified by {@link #getSchemaLocation()}
* <p>
* This method may be extended, but should not be overridden.
* </p>
*/
protected XSDSchema buildSchema() throws IOException {
//grab all the dependencies and create schema locators from the build
// schemas
List locators = new ArrayList();
List resolvers = new ArrayList();
for (Iterator d = allDependencies().iterator(); d.hasNext();) {
XSD dependency = (XSD) d.next();
SchemaLocator locator = dependency.createSchemaLocator();
if (locator != null) {
locators.add(locator);
}
SchemaLocationResolver resolver = dependency.createSchemaLocationResolver();
if (resolver != null) {
resolvers.add(resolver);
}
}
SchemaLocationResolver resolver = createSchemaLocationResolver();
if (resolver != null) {
resolvers.add(resolver);
}
//parse the location of the xsd with all the locators for dependent
// schemas
return Schemas.parse(getSchemaLocation(), locators, resolvers);
}
代码示例来源:origin: org.geotools.xsd/gt-xsd-wmts
protected void addDependencies(Set dependencies) {
dependencies.add(org.geotools.ows.v1_1.OWS.getInstance());
super.addDependencies(dependencies);
}
代码示例来源:origin: org.geotools/gt2-xml-core
public String toString() {
return getNamespaceURI();
}
}
代码示例来源:origin: org.geotools.xsd/gt-core
/**
* Convenience method for creating an instance of the schema for this configuration.
*
* @return The schema for this configuration.
* @deprecated use {@link #getXSD()} and {@link XSD#getSchema()}.
*/
public XSDSchema schema() {
try {
return getXSD().getSchema();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
代码示例来源:origin: org.geotools.xsd/gt-core
/**
* @return The namespace of the configuration schema.
*/
public final String getNamespaceURI() {
return getXSD().getNamespaceURI();
}
代码示例来源:origin: org.geotools.xsd/gt-core
configuration.getContext()
.registerComponentInstance("http://geotools.org/typeDefinition", type);
XSDSchema schema = configuration.getXSD().getSchema();
代码示例来源:origin: org.geoserver/gs-wfs
/**
* Suplements the schema built by the parent by adding hte aplication schema feature typs
* defined in GeoServer.
*/
protected XSDSchema buildSchema() throws IOException {
XSDSchema wfsSchema = super.buildSchema();
wfsSchema = schemaBuilder.addApplicationTypes(wfsSchema);
return wfsSchema;
}
}
代码示例来源:origin: org.geotools.xsd/gt-xsd-wfs
public PropertyValueCollection(FeatureCollection delegate, AttributeDescriptor descriptor) {
super(delegate);
this.descriptor = descriptor;
this.typeMappingProfiles.add(XS.getInstance().getTypeMappingProfile());
this.typeMappingProfiles.add(GML.getInstance().getTypeMappingProfile());
}
代码示例来源:origin: org.geoserver/gs-wfs
locators.add(xsd.createSchemaLocator());
代码示例来源:origin: org.geotools.xsd/gt-core
/**
* Creates the schema, returning <code>null</code> if the schema could not be created.
* </p>
* <code>namespaceURI</code> should not be <code>null</code>. All other parameters are ignored.
*
* @see XSDSchemaLocator#locateSchema(org.eclipse.xsd.XSDSchema, java.lang.String, java.lang.String, java.lang.String)
*/
public XSDSchema locateSchema(XSDSchema schema, String namespaceURI,
String rawSchemaLocationURI, String resolvedSchemaLocationURI) {
if (canHandle(schema,namespaceURI,rawSchemaLocationURI,resolvedSchemaLocationURI)) {
try {
return xsd.getSchema();
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Error occured getting schema", e);
}
}
return null;
}
代码示例来源:origin: org.geotools.xsd/gt-core
/**
* Builds the schema from the .xsd file specified by {@link #getSchemaLocation()}
* <p>
* This method may be extended, but should not be overridden.
* </p>
*/
protected XSDSchema buildSchema() throws IOException {
//grab all the dependencies and create schema locators from the build
// schemas
List locators = new ArrayList();
List resolvers = new ArrayList();
for (Iterator d = allDependencies().iterator(); d.hasNext();) {
XSD dependency = (XSD) d.next();
SchemaLocator locator = dependency.createSchemaLocator();
if (locator != null) {
locators.add(locator);
}
SchemaLocationResolver resolver = dependency.createSchemaLocationResolver();
if (resolver != null) {
resolvers.add(resolver);
}
}
SchemaLocationResolver resolver = createSchemaLocationResolver();
if (resolver != null) {
resolvers.add(resolver);
}
//parse the location of the xsd with all the locators for dependent
// schemas
return Schemas.parse(getSchemaLocation(), locators, resolvers);
}
代码示例来源:origin: org.geotools/gt2-xml-core
/**
* The dependencies of this schema.
*/
public final Set getDependencies() {
if (dependencies == null) {
synchronized (this) {
if (dependencies == null) {
dependencies = new LinkedHashSet();
//bootstrap, every xsd depends on XS
dependencies.add(XS.getInstance());
//call subclass hook
addDependencies(dependencies);
}
}
}
return dependencies;
}
代码示例来源:origin: org.geotools.xsd/gt-core
public String toString() {
return getNamespaceURI();
}
}
代码示例来源:origin: org.geotools/gt2-xml-core
/**
* Convenience method for creating an instance of the schema for this configuration.
*
* @return The schema for this configuration.
* @deprecated use {@link #getXSD()} and {@link XSD#getSchema()}.
*/
public XSDSchema schema() {
try {
return getXSD().getSchema();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!