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

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

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

XSD.getSchema介绍

[英]Returns the XSD object representing the contents of the schema.
[中]返回表示架构内容的XSD对象。

代码示例

代码示例来源:origin: geotools/geotools

/**
 * 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: geotools/geotools

/**
 * Creates the schema, returning <code>null</code> if the schema could not be created. <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: geotools/geotools

public XSDSchema locateSchema(XSDSchema schema, String namespaceURI,
  String rawSchemaLocationURI, String resolvedSchemaLocationURI) {
  
  for ( Iterator x = xsds.iterator(); x.hasNext(); ) {
    XSD xsd = (XSD) x.next();
    if ( xsd == null ) {
      continue;
    }
    if ( xsd.getNamespaceURI().equals( namespaceURI ) ) {
      try {
        return xsd.getSchema();
      } 
      catch (IOException e) {
        getLog().warn("Error occured locating schema: " + namespaceURI, e);
      }
    }
  }
   getLog().warn( "Could not locate schema for: " + namespaceURI );
  return null;
}

代码示例来源:origin: geotools/geotools

XSDSchema schema = configuration.getXSD().getSchema();

代码示例来源:origin: geotools/geotools

gml.setNamespace(gmlNamespace);
gml.setSchemaLocation(baseURL.toString() + "/" + gmlLocation);
gml.setResolvedSchema(gmlConfiguration.getXSD().getSchema());
xsd.getContents().add(gml);

代码示例来源:origin: geotools/geotools

schemas = new XSDSchema[] {config.getXSD().getSchema()};
} catch (IOException e) {
  throw (SAXException) new SAXException().initCause(e);

代码示例来源:origin: geotools/geotools

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);

相关文章