org.modeshape.sequencer.xsd
Class XsdReader
java.lang.Object
org.modeshape.sequencer.sramp.AbstractResolvingReader
org.modeshape.sequencer.xsd.XsdReader
@NotThreadSafe
public class XsdReader
- extends AbstractResolvingReader
A class that can parse XML Schema Documents and create a node structure based on the schema information.
This class can be subclassed and any of the 'process' methods overridden to customize the derived graph structure.
Method Summary |
protected void |
process(org.eclipse.xsd.XSDSchema schema,
String encoding,
long contentSize,
Node rootNode)
Read an XSDSchema instance and create the node hierarchy under the given root node. |
protected void |
processAnnotation(org.eclipse.xsd.XSDAnnotation annotation,
Node node)
|
protected void |
processAnnotations(List<org.eclipse.xsd.XSDAnnotation> annotations,
Node parentNode)
|
protected Node |
processAttributeDeclaration(org.eclipse.xsd.XSDAttributeDeclaration decl,
Node parentNode,
boolean isUse)
|
protected void |
processAttributeGroupContent(org.eclipse.xsd.XSDAttributeGroupContent content,
Node parentNode)
|
protected void |
processAttributeGroupDefinition(org.eclipse.xsd.XSDAttributeGroupDefinition defn,
Node parentNode)
|
protected void |
processAttributeUse(org.eclipse.xsd.XSDAttributeUse use,
Node parentNode)
|
protected void |
processComplexTypeContent(org.eclipse.xsd.XSDComplexTypeContent content,
Node parentNode)
|
protected void |
processComplexTypeDefinition(org.eclipse.xsd.XSDComplexTypeDefinition type,
Node parentNode)
|
protected Node |
processElementDeclaration(org.eclipse.xsd.XSDElementDeclaration decl,
Node parentNode)
|
protected
<Enumerator extends org.eclipse.emf.common.util.AbstractEnumerator>
void |
|
processEnumerator(Enumerator enumerator,
Node node,
String propertyName)
|
protected
<Enumerator extends org.eclipse.emf.common.util.AbstractEnumerator>
void |
|
processEnumerators(List<Enumerator> enumerators,
Node node,
String propertyName)
|
protected void |
processFacet(org.eclipse.xsd.XSDFacet facet,
Node node,
String propertyName,
int propertyType)
|
protected
<Facet extends org.eclipse.xsd.XSDFacet>
void |
|
processFacetsList(List<Facet> facets,
Node node,
String propertyName)
|
protected void |
processImport(org.eclipse.xsd.XSDImport xsdImport,
Node parentNode)
|
protected void |
processInclude(org.eclipse.xsd.XSDInclude xsdInclude,
Node parentNode)
|
protected Node |
processModelGroup(org.eclipse.xsd.XSDModelGroup group,
Node parentNode)
|
protected Node |
processModelGroupDefinition(org.eclipse.xsd.XSDModelGroupDefinition defn,
Node parentNode)
|
protected void |
processNonSchemaAttributes(org.eclipse.xsd.XSDConcreteComponent component,
Node node)
|
protected void |
processParticle(org.eclipse.xsd.XSDParticle content,
Node node)
|
protected void |
processRedefine(org.eclipse.xsd.XSDRedefine redefine,
Node parentNode)
|
protected void |
processSimpleTypeDefinition(org.eclipse.xsd.XSDSimpleTypeDefinition type,
Node node)
|
protected void |
processTypeFacets(org.eclipse.xsd.XSDSimpleTypeDefinition type,
Node typeNode,
org.eclipse.xsd.XSDTypeDefinition baseType)
|
protected Node |
processWildcard(org.eclipse.xsd.XSDWildcard wildcard,
Node parentNode)
|
void |
read(InputSource source,
Node outputNode)
Read the document from the supplied stream, and produce the derived content. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATTRIBUTE_DECLARATIONS
public static final SymbolSpace ATTRIBUTE_DECLARATIONS
- In XML Schema, there is a distinct symbol space within each target namespace for each kind of declaration and definition component, except that within a
target namespace the simple type definitions and complex type definitions share a single symbol space. See the specification for details.
ELEMENT_DECLARATION
public static final SymbolSpace ELEMENT_DECLARATION
TYPE_DEFINITIONS
public static final SymbolSpace TYPE_DEFINITIONS
ATTRIBUTE_GROUP_DEFINITIONS
public static final SymbolSpace ATTRIBUTE_GROUP_DEFINITIONS
MODEL_GROUP_DEFINITIONS
public static final SymbolSpace MODEL_GROUP_DEFINITIONS
IDENTITY_CONSTRAINT_DEFINITIONS
public static final SymbolSpace IDENTITY_CONSTRAINT_DEFINITIONS
XsdReader
public XsdReader(Sequencer.Context context)
read
public void read(InputSource source,
Node outputNode)
throws Exception
- Description copied from class:
AbstractResolvingReader
- Read the document from the supplied stream, and produce the derived content.
- Specified by:
read
in class AbstractResolvingReader
- Parameters:
source
- the input source of the document; may not be nulloutputNode
- the parent node at which the derived content should be written; may not be null
- Throws:
Exception
- if there is a problem reading the XSD content
process
protected void process(org.eclipse.xsd.XSDSchema schema,
String encoding,
long contentSize,
Node rootNode)
throws Exception
- Read an XSDSchema instance and create the node hierarchy under the given root node.
- Parameters:
schema
- the schema object; may not be nullencoding
- the encoding for the XSD; may be null if the encoding is not specifiedcontentSize
- the size of the XML Schema Document content; may not be negativerootNode
- the root node that will be populated with the XML Schema Document information
- Throws:
Exception
- if there is a probelm reading the XSD content
processImport
protected void processImport(org.eclipse.xsd.XSDImport xsdImport,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processInclude
protected void processInclude(org.eclipse.xsd.XSDInclude xsdInclude,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processRedefine
protected void processRedefine(org.eclipse.xsd.XSDRedefine redefine,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processSimpleTypeDefinition
protected void processSimpleTypeDefinition(org.eclipse.xsd.XSDSimpleTypeDefinition type,
Node node)
throws RepositoryException
- Throws:
RepositoryException
processTypeFacets
protected void processTypeFacets(org.eclipse.xsd.XSDSimpleTypeDefinition type,
Node typeNode,
org.eclipse.xsd.XSDTypeDefinition baseType)
throws RepositoryException
- Throws:
RepositoryException
processComplexTypeDefinition
protected void processComplexTypeDefinition(org.eclipse.xsd.XSDComplexTypeDefinition type,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processElementDeclaration
protected Node processElementDeclaration(org.eclipse.xsd.XSDElementDeclaration decl,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processAttributeDeclaration
protected Node processAttributeDeclaration(org.eclipse.xsd.XSDAttributeDeclaration decl,
Node parentNode,
boolean isUse)
throws RepositoryException
- Throws:
RepositoryException
processComplexTypeContent
protected void processComplexTypeContent(org.eclipse.xsd.XSDComplexTypeContent content,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processParticle
protected void processParticle(org.eclipse.xsd.XSDParticle content,
Node node)
throws RepositoryException
- Throws:
RepositoryException
processModelGroupDefinition
protected Node processModelGroupDefinition(org.eclipse.xsd.XSDModelGroupDefinition defn,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processModelGroup
protected Node processModelGroup(org.eclipse.xsd.XSDModelGroup group,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processAttributeGroupContent
protected void processAttributeGroupContent(org.eclipse.xsd.XSDAttributeGroupContent content,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processAttributeGroupDefinition
protected void processAttributeGroupDefinition(org.eclipse.xsd.XSDAttributeGroupDefinition defn,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processWildcard
protected Node processWildcard(org.eclipse.xsd.XSDWildcard wildcard,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processAttributeUse
protected void processAttributeUse(org.eclipse.xsd.XSDAttributeUse use,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processNonSchemaAttributes
protected void processNonSchemaAttributes(org.eclipse.xsd.XSDConcreteComponent component,
Node node)
throws RepositoryException
- Throws:
RepositoryException
processAnnotation
protected void processAnnotation(org.eclipse.xsd.XSDAnnotation annotation,
Node node)
throws RepositoryException
- Throws:
RepositoryException
processAnnotations
protected void processAnnotations(List<org.eclipse.xsd.XSDAnnotation> annotations,
Node parentNode)
throws RepositoryException
- Throws:
RepositoryException
processFacet
protected void processFacet(org.eclipse.xsd.XSDFacet facet,
Node node,
String propertyName,
int propertyType)
throws RepositoryException
- Throws:
RepositoryException
processFacetsList
protected <Facet extends org.eclipse.xsd.XSDFacet> void processFacetsList(List<Facet> facets,
Node node,
String propertyName)
throws RepositoryException
- Throws:
RepositoryException
processEnumerators
protected <Enumerator extends org.eclipse.emf.common.util.AbstractEnumerator> void processEnumerators(List<Enumerator> enumerators,
Node node,
String propertyName)
throws RepositoryException
- Throws:
RepositoryException
processEnumerator
protected <Enumerator extends org.eclipse.emf.common.util.AbstractEnumerator> void processEnumerator(Enumerator enumerator,
Node node,
String propertyName)
throws RepositoryException
- Throws:
RepositoryException
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.