本文整理了Java中org.geotools.xsd.XSD.getSchemaLocation()
方法的一些代码示例,展示了XSD.getSchemaLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSD.getSchemaLocation()
方法的具体详情如下:
包路径:org.geotools.xsd.XSD
类名称:XSD
方法名:getSchemaLocation
[英]The location on the local disk of the top level .xsd file which defines the schema.
[中]顶层在本地磁盘上的位置。定义模式的xsd文件。
代码示例来源:origin: geotools/geotools
public boolean canHandle(
XSDSchema schema,
String namespaceURI,
String rawSchemaLocationURI,
String resolvedSchemaLocationURI) {
return xsd.getNamespaceURI().equals(namespaceURI)
&& xsd.getSchemaLocation().equals(resolvedSchemaLocationURI);
}
};
代码示例来源:origin: geotools/geotools
/**
* Returns the url to the file defining the 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.
*
* @deprecated use {@link XSD#getSchemaLocation()}.
*/
public final String getSchemaFileURL() {
return getXSD().getSchemaLocation();
}
代码示例来源:origin: geotools/geotools
return Schemas.parse(getSchemaLocation(), locators, resolvers);
代码示例来源:origin: geotools/geotools
throw new RuntimeException(
"Unsupported GML version for schema at "
+ configuration.getXSD().getSchemaLocation());
代码示例来源:origin: geotools/geotools
for (XSD dep : deps) {
if (dep.getNamespaceURI().equals(uri)) {
locations[i + 1] = dep.getSchemaLocation();
代码示例来源:origin: geotools/geotools
/** Test that a schema known to be in the catalog is resolved to the expected local file. */
@Test
public void testCatalogSchemaResolution() throws Exception {
URL catalogLocation = getClass().getResource(schemaBase + "mappedPolygons.oasis.xml");
String namespace = "http://www.cgi-iugs.org/xml/GeoSciML/2";
String schemaLocation = "http://schemas.opengis.net/GeoSciML/geosciml.xsd";
Configuration config =
new AppSchemaConfiguration(
namespace,
schemaLocation,
new SchemaResolver(SchemaCatalog.build(catalogLocation)));
String resolvedSchemaLocation = config.getXSD().getSchemaLocation();
assertTrue(resolvedSchemaLocation.startsWith("file:/"));
assertTrue(
resolvedSchemaLocation.endsWith(
schemaBase + "commonSchemas_new/GeoSciML/geosciml.xsd"));
}
}
内容来源于网络,如有侵权,请联系作者删除!