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; } }
XSDSchema schema = locator.locateSchema(null, namespaceURI, schemaLocation, null);
locators.get(j).locateSchema(null, namespace, location, null); XSDSchema schema = locators.get(i).locateSchema(null, uri, null, null);
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; } }
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; } }
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; } }
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); }
/** * 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 ); }
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); }
/** * 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() ) ); }
XSDSchema schema = locator.locateSchema(null, namespaceURI, schemaLocation, null); if(schema != null){ resolvedSchemas.add(schema);
XSDSchema schema = locator.locateSchema(null, namespaceURI, schemaLocation, null);
XSDSchema schema = locator.locateSchema(null, namespaceURI, schemaLocation, null);
XSDSchema schema = locators[j].locateSchema(null, namespace, location, null); XSDSchema schema = locators[i].locateSchema(null, uri, null, null);
XSDSchema schema = locators[j].locateSchema(null, namespace, location, null); XSDSchema schema = locators[i].locateSchema(null, uri, null, null);
XSDSchema schema = locators[j].locateSchema(null, namespace, location, null); XSDSchema schema = locators[i].locateSchema(null, uri, null, null);