org.geotools.xml.XSD.createSchemaLocator()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(114)

本文整理了Java中org.geotools.xml.XSD.createSchemaLocator()方法的一些代码示例,展示了XSD.createSchemaLocator()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSD.createSchemaLocator()方法的具体详情如下:
包路径:org.geotools.xml.XSD
类名称:XSD
方法名:createSchemaLocator

XSD.createSchemaLocator介绍

暂无

代码示例

代码示例来源: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-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.geoserver/gs-wfs

locators.add(xsd.createSchemaLocator());

相关文章