Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.ws.commons.schema
Class XmlSchemaCollection

    java.lang.Object
      org.apache.ws.commons.schema.XmlSchemaCollection

    public final class XmlSchemaCollection

extends java.lang.Object

Contains a cache of XML Schema definition language (XSD).

Constructor Summary
`XmlSchemaCollection()` Creates new XmlSchemaCollection

Method Summary
`boolean` | `check(org.apache.ws.commons.schema.XmlSchemaCollection.SchemaKey pKey)`
`XmlSchemaAttribute` | `getAttributeByQName(javax.xml.namespace.QName schemaAttributeName)` Find a global attribute by QName in this collection of schemas.
`XmlSchemaElement` | `getElementByQName(javax.xml.namespace.QName qname)`
`ExtensionRegistry` | `getExtReg()`
`java.util.Map` | `getKnownNamespaceMap()` get the namespace map
`NamespacePrefixList` | `getNamespaceContext()`
`URIResolver` | `getSchemaResolver()` Retrieve the custom URI resolver, if any.
`XmlSchemaType` | `getTypeByQName(javax.xml.namespace.QName schemaTypeName)`
`XmlSchema[]` | `getXmlSchema(java.lang.String systemId)` Retrieve a set of XmlSchema instances with the given its system ID.
`XmlSchema[]` | `getXmlSchemas()` Returns an array of all the XmlSchemas in this collection.
`void` | `init()` This section should comply to the XMLSchema specification; see http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/datatypes.html#built-in-datatypes.
`void` | `pop()`
`void` | `push(org.apache.ws.commons.schema.XmlSchemaCollection.SchemaKey pKey)`
`XmlSchema` | `read(org.w3c.dom.Document doc, java.lang.String uri, ValidationEventHandler veh)`
`XmlSchema` | `read(org.w3c.dom.Document doc, java.lang.String uri, ValidationEventHandler veh, TargetNamespaceValidator validator)`
`XmlSchema` | `read(org.w3c.dom.Document doc, ValidationEventHandler veh)`
`XmlSchema` | `read(org.w3c.dom.Element elem)`
`XmlSchema` | `read(org.w3c.dom.Element elem, java.lang.String uri)`
`XmlSchema` | `read(org.xml.sax.InputSource inputSource, ValidationEventHandler veh)`
`XmlSchema` | `read(java.io.Reader r, ValidationEventHandler veh)`
`XmlSchema` | `read(javax.xml.transform.Source source, ValidationEventHandler veh)`
`XmlSchema` | `schemaForNamespace(java.lang.String uri)` Return the schema from this collection for a particular targetNamespace.
`void` | `setBaseUri(java.lang.String baseUri)` Set the base URI.
`void` | `setExtReg(ExtensionRegistry extReg)`
`void` | `setKnownNamespaceMap(java.util.Map knownNamespaceMap)` sets the known namespace map
`void` | `setNamespaceContext(NamespacePrefixList namespaceContext)`
`void` | `setSchemaResolver(URIResolver schemaResolver)` Register a custom URI resolver
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### XmlSchemaCollection

    public XmlSchemaCollection()

  Creates new XmlSchemaCollection

Method Detail

### getExtReg

    public ExtensionRegistry getExtReg()

### setExtReg

    public void setExtReg(ExtensionRegistry extReg)

### getKnownNamespaceMap

    public java.util.Map getKnownNamespaceMap()

  get the namespace map

  Returns:
    a map of previously known XMLSchema objects keyed by their namespace (String)

### setKnownNamespaceMap

    public void setKnownNamespaceMap(java.util.Map knownNamespaceMap)

  sets the known namespace map

  Parameters:
    `knownNamespaceMap` - a map of previously known XMLSchema objects keyed by their namespace (String)

### setBaseUri

    public void setBaseUri(java.lang.String baseUri)

  Set the base URI. This is used when schemas need to be loaded from relative locations

  Parameters:
    `baseUri` - baseUri for this

### setSchemaResolver

    public void setSchemaResolver(URIResolver schemaResolver)

  Register a custom URI resolver

  Parameters:
    `schemaResolver` - resolver

### getSchemaResolver

    public URIResolver getSchemaResolver()

  Retrieve the custom URI resolver, if any.

  Returns:
    the current resolver.

### init

    public void init()

  This section should comply to the XMLSchema specification; see http://www.w3.org/TR/2004/PER-xmlschema-2-20040318/datatypes.html#built-in-datatypes. This needs to be inspected by another pair of eyes

### read

    public XmlSchema read(java.io.Reader r,
                          ValidationEventHandler veh)

### read

    public XmlSchema read(org.xml.sax.InputSource inputSource,
                          ValidationEventHandler veh)

### read

    public XmlSchema read(javax.xml.transform.Source source,
                          ValidationEventHandler veh)

### read

    public XmlSchema read(org.w3c.dom.Document doc,
                          ValidationEventHandler veh)

### read

    public XmlSchema read(org.w3c.dom.Element elem)

### read

    public XmlSchema read(org.w3c.dom.Document doc,
                          java.lang.String uri,
                          ValidationEventHandler veh)

### read

    public XmlSchema read(org.w3c.dom.Document doc,
                          java.lang.String uri,
                          ValidationEventHandler veh,
                          TargetNamespaceValidator validator)

### read

    public XmlSchema read(org.w3c.dom.Element elem,
                          java.lang.String uri)

### getXmlSchema

    public XmlSchema[] getXmlSchema(java.lang.String systemId)

  Retrieve a set of XmlSchema instances with the given its system ID. In general, this will return a single instance, or none. However, if the schema has no targetNamespace attribute and was included from schemata with different target namespaces, then it may occur, that multiple schema instances with different logical target namespaces may be returned.

  Parameters:
    `systemId` - the system id for this schema
  Returns:
    array of XmlSchema objects

### getXmlSchemas

    public XmlSchema[] getXmlSchemas()

  Returns an array of all the XmlSchemas in this collection.

  Returns:
    the list of XmlSchema objects

### getElementByQName

    public XmlSchemaElement getElementByQName(javax.xml.namespace.QName qname)

### getTypeByQName

    public XmlSchemaType getTypeByQName(javax.xml.namespace.QName schemaTypeName)

### getAttributeByQName

    public XmlSchemaAttribute getAttributeByQName(javax.xml.namespace.QName schemaAttributeName)

  Find a global attribute by QName in this collection of schemas.

  Parameters:
    `schemaAttributeName` - the name of the attribute.
  Returns:
    the attribute or null.

### schemaForNamespace

    public XmlSchema schemaForNamespace(java.lang.String uri)

  Return the schema from this collection for a particular targetNamespace.

  Parameters:
    `uri` - target namespace URI.
  Returns:
    the schema.

### getNamespaceContext

    public NamespacePrefixList getNamespaceContext()

### setNamespaceContext

    public void setNamespaceContext(NamespacePrefixList namespaceContext)

### push

    public void push(org.apache.ws.commons.schema.XmlSchemaCollection.SchemaKey pKey)

### pop

    public void pop()

### check

    public boolean check(org.apache.ws.commons.schema.XmlSchemaCollection.SchemaKey pKey)

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.