com.openharbor.beck.xml
Class SchemaReader
java.lang.Object
com.openharbor.beck.xml.SchemaReader
- public class SchemaReader
- extends java.lang.Object
Constructs a structural Model from an XML schema.
Method Summary |
protected boolean |
findElements(org.apache.xerces.xs.XSParticle particle,
java.util.Collection elements)
|
protected Attribute |
getAttribute(org.apache.xerces.xs.XSAttributeUse from)
|
protected Attribute[] |
getAttributes(org.apache.xerces.xs.XSComplexTypeDefinition complexType)
|
protected Element |
getElement(org.apache.xerces.xs.XSElementDeclaration from)
|
protected Element |
getElement(org.apache.xerces.xs.XSElementDeclaration from,
long minOccurs,
long maxOccurs)
|
protected Element[] |
getElements(org.apache.xerces.xs.XSComplexTypeDefinition complexType)
|
static XMLName |
getName(org.apache.xerces.xs.XSObject obj)
|
org.apache.xerces.xs.XSLoader |
getSchemaLoader()
|
protected Type |
getType(org.apache.xerces.xs.XSTypeDefinition from)
|
static void |
main(java.lang.String[] argv)
Construct a Model from each of the named schemas, and dump each Model to System.out. |
static org.apache.xerces.xs.XSLoader |
newLoader()
|
Model |
read(org.w3c.dom.ls.LSInput input)
|
Model |
read(java.lang.String uri,
org.apache.xerces.xs.XSModel source)
|
Model |
read(java.net.URL url)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
protected static org.apache.commons.logging.Log LOG
log
protected org.apache.commons.logging.Log log
schemaLoader
protected org.apache.xerces.xs.XSLoader schemaLoader
model
protected Model model
attribute2structural
protected java.util.Map attribute2structural
element2structural
protected java.util.Map element2structural
type2structural
protected java.util.Map type2structural
NO_ELEMENTS
protected static final org.apache.xerces.xs.XSElementDeclaration[] NO_ELEMENTS
MODEL_DISPLAY_MAPPING
protected static final java.lang.String MODEL_DISPLAY_MAPPING
- A mapping from Model to XML suitable for visual inspection.
This is not a mapping from XML to a Model, nor does it produce XML well-suited for that.
- See Also:
- Constant Field Values
SchemaReader
public SchemaReader()
getSchemaLoader
public org.apache.xerces.xs.XSLoader getSchemaLoader()
throws java.lang.Exception
- Throws:
java.lang.Exception
read
public Model read(org.w3c.dom.ls.LSInput input)
throws java.lang.Exception
- Throws:
java.lang.Exception
read
public Model read(java.net.URL url)
throws java.lang.Exception
- Throws:
java.lang.Exception
read
public Model read(java.lang.String uri,
org.apache.xerces.xs.XSModel source)
throws java.lang.Exception
- Throws:
java.lang.Exception
getAttribute
protected Attribute getAttribute(org.apache.xerces.xs.XSAttributeUse from)
getElement
protected Element getElement(org.apache.xerces.xs.XSElementDeclaration from)
getElement
protected Element getElement(org.apache.xerces.xs.XSElementDeclaration from,
long minOccurs,
long maxOccurs)
getType
protected Type getType(org.apache.xerces.xs.XSTypeDefinition from)
getAttributes
protected Attribute[] getAttributes(org.apache.xerces.xs.XSComplexTypeDefinition complexType)
getElements
protected Element[] getElements(org.apache.xerces.xs.XSComplexTypeDefinition complexType)
findElements
protected boolean findElements(org.apache.xerces.xs.XSParticle particle,
java.util.Collection elements)
newLoader
public static org.apache.xerces.xs.XSLoader newLoader()
throws java.lang.Exception
- Throws:
java.lang.Exception
getName
public static final XMLName getName(org.apache.xerces.xs.XSObject obj)
main
public static void main(java.lang.String[] argv)
throws java.lang.Exception
- Construct a Model from each of the named schemas, and dump each Model to System.out.
- Throws:
java.lang.Exception