@NotThreadSafe public class XsdReader extends AbstractResolvingReader
This class can be subclassed and any of the 'process' methods overridden to customize the derived graph structure.
Modifier and Type | Field and Description |
---|---|
static 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.
|
static SymbolSpace |
ATTRIBUTE_GROUP_DEFINITIONS |
static SymbolSpace |
ELEMENT_DECLARATION |
static SymbolSpace |
IDENTITY_CONSTRAINT_DEFINITIONS |
static SymbolSpace |
MODEL_GROUP_DEFINITIONS |
static SymbolSpace |
TYPE_DEFINITIONS |
context, logger
Constructor and Description |
---|
XsdReader(Sequencer.Context context) |
Modifier and Type | Method and Description |
---|---|
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> |
processEnumerator(Enumerator enumerator,
Node node,
String propertyName) |
protected <Enumerator extends org.eclipse.emf.common.util.AbstractEnumerator> |
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> |
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,
Set<String> excludeAttributes) |
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.
|
protected static Set<String> |
removePrefix(String... attributeNames) |
getContext, getResolvers, read, registerForSymbolSpace, registerNamespace, resolveReferences, setReference
public static final SymbolSpace ATTRIBUTE_DECLARATIONS
public static final SymbolSpace ELEMENT_DECLARATION
public static final SymbolSpace TYPE_DEFINITIONS
public static final SymbolSpace ATTRIBUTE_GROUP_DEFINITIONS
public static final SymbolSpace MODEL_GROUP_DEFINITIONS
public static final SymbolSpace IDENTITY_CONSTRAINT_DEFINITIONS
public XsdReader(Sequencer.Context context)
public void read(InputSource source, Node outputNode) throws Exception
AbstractResolvingReader
read
in class AbstractResolvingReader
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 nullException
- if there is a problem reading the XSD contentprotected void process(org.eclipse.xsd.XSDSchema schema, String encoding, long contentSize, Node rootNode) throws Exception
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 informationException
- if there is a probelm reading the XSD contentprotected void processImport(org.eclipse.xsd.XSDImport xsdImport, Node parentNode) throws RepositoryException
RepositoryException
protected void processInclude(org.eclipse.xsd.XSDInclude xsdInclude, Node parentNode) throws RepositoryException
RepositoryException
protected void processRedefine(org.eclipse.xsd.XSDRedefine redefine, Node parentNode) throws RepositoryException
RepositoryException
protected void processSimpleTypeDefinition(org.eclipse.xsd.XSDSimpleTypeDefinition type, Node node) throws RepositoryException
RepositoryException
protected void processTypeFacets(org.eclipse.xsd.XSDSimpleTypeDefinition type, Node typeNode, org.eclipse.xsd.XSDTypeDefinition baseType) throws RepositoryException
RepositoryException
protected void processComplexTypeDefinition(org.eclipse.xsd.XSDComplexTypeDefinition type, Node parentNode) throws RepositoryException
RepositoryException
protected Node processElementDeclaration(org.eclipse.xsd.XSDElementDeclaration decl, Node parentNode) throws RepositoryException
RepositoryException
protected Node processAttributeDeclaration(org.eclipse.xsd.XSDAttributeDeclaration decl, Node parentNode, boolean isUse) throws RepositoryException
RepositoryException
protected void processComplexTypeContent(org.eclipse.xsd.XSDComplexTypeContent content, Node parentNode) throws RepositoryException
RepositoryException
protected void processParticle(org.eclipse.xsd.XSDParticle content, Node node) throws RepositoryException
RepositoryException
protected Node processModelGroupDefinition(org.eclipse.xsd.XSDModelGroupDefinition defn, Node parentNode) throws RepositoryException
RepositoryException
protected Node processModelGroup(org.eclipse.xsd.XSDModelGroup group, Node parentNode) throws RepositoryException
RepositoryException
protected void processAttributeGroupContent(org.eclipse.xsd.XSDAttributeGroupContent content, Node parentNode) throws RepositoryException
RepositoryException
protected void processAttributeGroupDefinition(org.eclipse.xsd.XSDAttributeGroupDefinition defn, Node parentNode) throws RepositoryException
RepositoryException
protected Node processWildcard(org.eclipse.xsd.XSDWildcard wildcard, Node parentNode) throws RepositoryException
RepositoryException
protected void processAttributeUse(org.eclipse.xsd.XSDAttributeUse use, Node parentNode) throws RepositoryException
RepositoryException
protected void processNonSchemaAttributes(org.eclipse.xsd.XSDConcreteComponent component, Node node, Set<String> excludeAttributes) throws RepositoryException
RepositoryException
protected void processAnnotation(org.eclipse.xsd.XSDAnnotation annotation, Node node) throws RepositoryException
RepositoryException
protected void processAnnotations(List<org.eclipse.xsd.XSDAnnotation> annotations, Node parentNode) throws RepositoryException
RepositoryException
protected void processFacet(org.eclipse.xsd.XSDFacet facet, Node node, String propertyName, int propertyType) throws RepositoryException
RepositoryException
protected <Facet extends org.eclipse.xsd.XSDFacet> void processFacetsList(List<Facet> facets, Node node, String propertyName) throws RepositoryException
RepositoryException
protected <Enumerator extends org.eclipse.emf.common.util.AbstractEnumerator> void processEnumerators(List<Enumerator> enumerators, Node node, String propertyName) throws RepositoryException
RepositoryException
protected <Enumerator extends org.eclipse.emf.common.util.AbstractEnumerator> void processEnumerator(Enumerator enumerator, Node node, String propertyName) throws RepositoryException
RepositoryException
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.