public String toString() { return getNamespaceURI(); } }
public String toString() { return getNamespaceURI(); } }
/** * Implementation of equals, equality is based soley on {@link #getNamespaceURI()}. */ public final boolean equals(Object obj) { if (obj instanceof XSD) { XSD other = (XSD) obj; return getNamespaceURI().equals(other.getNamespaceURI()); } return false; }
/** * Implementation of equals, equality is based soley on {@link #getNamespaceURI()}. */ public final boolean equals(Object obj) { if (obj instanceof XSD) { XSD other = (XSD) obj; return getNamespaceURI().equals(other.getNamespaceURI()); } return false; }
/** * Determines if the locator can locate a schema for the specified namespace * and location. * * @return true if it can handle, otherwise false. */ public boolean canHandle( XSDSchema schema, String namespaceURI, String rawSchemaLocationURI, String resolvedSchemaLocationURI) { return xsd.getNamespaceURI().equals(namespaceURI); }
public final int hashCode() { return getNamespaceURI().hashCode(); }
public final int hashCode() { return getNamespaceURI().hashCode(); }
/** * Determines if the locator can resolve the schema location for a particular * namespace uri and schema location. * * @return true if it can handle, otherwise false. */ public boolean canHandle( XSDSchema schema, String uri, String location ) { if ( xsd.getNamespaceURI().equals(uri) ) { //strip off the filename and do a resource lookup String fileName = new File(location).getName(); URL xsdLocation = xsd.getClass().getResource(fileName); return xsdLocation != null; } return false; }
/** * @return The namespace of the configuration schema. */ public final String getNamespaceURI() { return getXSD().getNamespaceURI(); }
/** * @return The namespace of the configuration schema. */ public final String getNamespaceURI() { return getXSD().getNamespaceURI(); }
/** * Returns the XSD object representing the contents of the schema. */ public final XSDSchema getSchema() throws IOException { if (schema == null) { synchronized (this) { if (schema == null) { LOGGER.fine("building schema for schema: " + getNamespaceURI()); schema = buildSchema(); } } } return schema; }
/** * Returns the XSD object representing the contents of the schema. */ public final XSDSchema getSchema() throws IOException { if (schema == null) { synchronized (this) { if (schema == null) { LOGGER.fine("building schema for schema: " + getNamespaceURI()); schema = buildSchema(); } } } return schema; }
/** * Creates the schema, returning <code>null</code> if the schema could not be created. * </p> * <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 (xsd.getNamespaceURI().equals(namespaceURI)) { try { return xsd.getSchema(); } catch (IOException e) { LOGGER.log(Level.WARNING, "Error occured getting schema", e); } } return null; }
/** * Resolves <param>location<param> to a physical location. * <p> * Resolution is performed by stripping the filename off of <param>location</param> * and looking up a resource located in the same package as the xsd. * </p> */ public String resolveSchemaLocation(XSDSchema schema, String uri, String location) { if (location == null) { return null; } //if no namespace given, assume default for the current schema if (((uri == null) || "".equals(uri)) && (schema != null)) { uri = schema.getTargetNamespace(); } //namespace match? if (xsd.getNamespaceURI().equals(uri)) { //strip off the filename and do a resource lookup String fileName = new File(location).getName(); URL xsdLocation = xsd.getClass().getResource(fileName); if (xsdLocation != null) { return xsdLocation.toString(); } } return null; }
encoding.setAttributeNS(gml.getNamespaceURI(), "id", id);