xml.parser
Class SchemaMapping.Mapping

java.lang.Object
  extended by xml.parser.SchemaMapping.Mapping
Direct Known Subclasses:
SchemaMapping.DefaultRule, SchemaMapping.DoctypeRule, SchemaMapping.DocumentElementRule, SchemaMapping.IncludeMapping, SchemaMapping.NamespaceRule, SchemaMapping.TransformURI, SchemaMapping.URIPatternRule, SchemaMapping.URIResourceRule
Enclosing class:
SchemaMapping

public abstract static class SchemaMapping.Mapping
extends java.lang.Object


Field Summary
protected  java.lang.String base
          explicit xml:base, if any
protected  java.net.URI baseURI
          this schema mapping file's URI
protected  SchemaMapping parent
          parent of this Mapping
 
Method Summary
 java.net.URI getBaseURI()
           
abstract  SchemaMapping.Mapping getMappingForDocument(java.lang.String publicId, java.lang.String systemId, java.lang.String namespace, java.lang.String prefix, java.lang.String localName)
          iterate over the mappings and return the first hit.
 SchemaMapping getParent()
           
abstract  SchemaMapping.Result getSchemaForDocument(java.lang.String publicId, java.lang.String systemId, java.lang.String namespace, java.lang.String prefix, java.lang.String localName, boolean followTypeId)
          iterate over the mappings and return the first hit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected SchemaMapping parent
parent of this Mapping


baseURI

protected java.net.URI baseURI
this schema mapping file's URI


base

protected java.lang.String base
explicit xml:base, if any

Method Detail

getParent

public SchemaMapping getParent()

getBaseURI

public java.net.URI getBaseURI()
Returns:
this schema mapping's URL or null if it's totally in memory

getSchemaForDocument

public abstract SchemaMapping.Result getSchemaForDocument(java.lang.String publicId,
                                                          java.lang.String systemId,
                                                          java.lang.String namespace,
                                                          java.lang.String prefix,
                                                          java.lang.String localName,
                                                          boolean followTypeId)
iterate over the mappings and return the first hit. all the parameters are given the same priority : it's really the ordering of rules which defines a priority order. Any of the paremeters can be null.

Parameters:
publicId - public ID of the parsed document
systemId - system ID of the parsed document
namespace - namespace of the root element of the parsed document
prefix - prefix of the root element of the parsed document
localName - localName of the root element of the parsed document
followTypeId - if the schema referenced from a typeId must be returned
Returns:
schema URL for given document (and baseURI) or null if not found

getMappingForDocument

public abstract SchemaMapping.Mapping getMappingForDocument(java.lang.String publicId,
                                                            java.lang.String systemId,
                                                            java.lang.String namespace,
                                                            java.lang.String prefix,
                                                            java.lang.String localName)
iterate over the mappings and return the first hit. all the parameters are given the same priority : it's really the ordering of rules which defines a priority order. Any of the paremeters can be null.

Parameters:
publicId - public ID of the parsed document
systemId - system ID of the parsed document
namespace - namespace of the root element of the parsed document
prefix - prefix of the root element of the parsed document
localName - localName of the root element of the parsed document
Returns:
schema URL for given document (and baseURI) or null if not found