gpt4 book ai didi

org.eclipse.xsd.util.XSDSchemaLocator.locateSchema()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 03:45:40 27 4
gpt4 key购买 nike

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

XSDSchemaLocator.locateSchema介绍

[英]Locate the schema for the given namespace.
[中]找到给定命名空间的架构。

代码示例

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

public XSDSchema locateSchema(
      XSDSchema xsdSchema,
      String namespaceURI,
      String rawSchemaLocationURI,
      String resolvedSchemaLocationURI) {
    for (int i = 0; i < locators.size(); i++) {
      XSDSchemaLocator locator = (XSDSchemaLocator) locators.get(i);
      XSDSchema schema =
          locator.locateSchema(
              xsdSchema,
              namespaceURI,
              rawSchemaLocationURI,
              resolvedSchemaLocationURI);
      if (schema != null) {
        return schema;
      }
    }
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine("Could not locate schema for: " + rawSchemaLocationURI + ".");
    }
    return null;
  }
}

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

XSDSchema schema = locator.locateSchema(null, namespaceURI, schemaLocation, null);

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

locators.get(j).locateSchema(null, namespace, location, null);
XSDSchema schema = locators.get(i).locateSchema(null, uri, null, null);

代码示例来源:origin: org.geotools/gt2-xml-xsd

public XSDSchema locateSchema(XSDSchema xsdSchema, String namespaceURI,
    String rawSchemaLocationURI, String resolvedSchemaLocationURI) {
    for (int i = 0; i < locators.size(); i++) {
      XSDSchemaLocator locator = (XSDSchemaLocator) locators.get( i );
      XSDSchema schema = 
        locator.locateSchema(xsdSchema, namespaceURI, rawSchemaLocationURI, resolvedSchemaLocationURI);
      if (schema != null) {
        return schema;
      }
    }
    return null;
  }
}

代码示例来源:origin: org.geotools/gt2-xml-core

public XSDSchema locateSchema(XSDSchema xsdSchema, String namespaceURI,
    String rawSchemaLocationURI, String resolvedSchemaLocationURI) {
    for (int i = 0; i < locators.size(); i++) {
      XSDSchemaLocator locator = (XSDSchemaLocator) locators.get(i);
      XSDSchema schema = locator.locateSchema(xsdSchema, namespaceURI,
          rawSchemaLocationURI, resolvedSchemaLocationURI);
      if (schema != null) {
        return schema;
      }
    }
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine("Could not locate schema for: " + rawSchemaLocationURI + ".");
    }
    return null;
  }
}

代码示例来源:origin: org.geotools.xsd/gt-core

public XSDSchema locateSchema(XSDSchema xsdSchema, String namespaceURI,
    String rawSchemaLocationURI, String resolvedSchemaLocationURI) {
    for (int i = 0; i < locators.size(); i++) {
      XSDSchemaLocator locator = (XSDSchemaLocator) locators.get(i);
      XSDSchema schema = locator.locateSchema(xsdSchema, namespaceURI,
          rawSchemaLocationURI, resolvedSchemaLocationURI);
      if (schema != null) {
        return schema;
      }
    }
    if (LOGGER.isLoggable(Level.FINE)) {
      LOGGER.fine("Could not locate schema for: " + rawSchemaLocationURI + ".");
    }
    return null;
  }
}

代码示例来源:origin: org.eclipse/org.eclipse.xsd

protected XSDSchema locateSchema(XSDSchema xsdSchema, String namespace, String rawSchemaLocation, String resolvedSchemaLocation)
{
 XSDSchemaLocator xsdSchemaLocator = (XSDSchemaLocator)EcoreUtil.getRegisteredAdapter(xsdSchema.eResource(), XSDSchemaLocator.class);
 return 
  xsdSchemaLocator == null ? 
   null : 
   xsdSchemaLocator.locateSchema(xsdSchema, namespace, rawSchemaLocation, resolvedSchemaLocation);
}

代码示例来源:origin: org.geotools/gt2-xml-xsd

/**
 * Convenience method for creating an instance of the schema for this configuration.
 * 
 * @return The schema for this configuration.
 */
public XSDSchema schema() {
  return getSchemaLocator().locateSchema( null, getNamespaceURI(), null, null );
}

代码示例来源:origin: org.eclipse.xsd/org.eclipse.xsd

protected XSDSchema locateSchema(XSDSchema xsdSchema, String namespace, String rawSchemaLocation, String resolvedSchemaLocation)
{
 XSDSchemaLocator xsdSchemaLocator = (XSDSchemaLocator)EcoreUtil.getRegisteredAdapter(xsdSchema.eResource(), XSDSchemaLocator.class);
 return 
  xsdSchemaLocator == null ? 
   null : 
   xsdSchemaLocator.locateSchema(xsdSchema, namespace, rawSchemaLocation, resolvedSchemaLocation);
}

代码示例来源:origin: org.geotools/gt2-xml-xsd

/**
 * Encodes an object, element name pair.
 * 
 * @param object The object to encode.
 * @param element The name of the element to encode.
 * 
 * @return The object encoded.
 * @throws Exception
 */
protected Document encode( Object object, QName element ) throws Exception {
  Configuration configuration = createConfiguration();
  XSDSchema schema = configuration.getSchemaLocator().locateSchema( 
    null, configuration.getNamespaceURI(), null, null
  );
  
  Encoder encoder = new Encoder( configuration, schema );
  ByteArrayOutputStream output = new ByteArrayOutputStream();
  encoder.write( object, element, output );

  DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
  dbf.setNamespaceAware( true );
  
  return dbf.newDocumentBuilder().parse( 
    new ByteArrayInputStream( output.toByteArray() )
  );
}

代码示例来源:origin: org.geotools/gt2-xml-xsd

XSDSchema schema = locator.locateSchema(null, namespaceURI, schemaLocation, null);
if(schema != null){
  resolvedSchemas.add(schema);

代码示例来源:origin: org.geotools.xsd/gt-core

XSDSchema schema = locator.locateSchema(null, namespaceURI, schemaLocation, null);

代码示例来源:origin: org.geotools/gt2-xml-core

XSDSchema schema = locator.locateSchema(null, namespaceURI, schemaLocation, null);

代码示例来源:origin: org.geotools/gt2-xml-core

XSDSchema schema = locators[j].locateSchema(null, namespace, location, null);
XSDSchema schema = locators[i].locateSchema(null, uri, null, null);

代码示例来源:origin: org.geotools/gt2-xml-xsd

XSDSchema schema = locators[j].locateSchema(null,
      namespace, location, null);
XSDSchema schema = locators[i].locateSchema(null, uri,
    null, null);

代码示例来源:origin: org.geotools.xsd/gt-core

XSDSchema schema = locators[j].locateSchema(null, namespace, location, null);
XSDSchema schema = locators[i].locateSchema(null, uri, null, null);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com