org.plasma.provisioning.xsd
Class DatatypeCollector

java.lang.Object
  extended by org.plasma.provisioning.xsd.AbstractCollector
      extended by org.plasma.provisioning.xsd.DatatypeCollector
All Implemented Interfaces:
SimpleTypeVisitor

public class DatatypeCollector
extends AbstractCollector
implements SimpleTypeVisitor

Schema (XSD) datatype name collector (simple type visitor) which receives visitor events and detects "leaf" nodes within a simple type hierarchy which are XSD fundamental types and collects the type name(s). Clients then decide how to handle the collected type(s).

See Also:
SimpleTypeVisitor

Constructor Summary
DatatypeCollector(Schema schema, java.util.Map<java.lang.String,SimpleType> simpleTypeMap)
           
 
Method Summary
 java.util.List<javax.xml.namespace.QName> getResult()
           
 java.lang.String getTargetNamespace()
          Returns the target namespace for a particular schema instance.
 SimpleType getTopLevelSimpleType(javax.xml.namespace.QName name)
          Since the the type hierarchy traversal will encounter qualified name references to many simple types, the traversal logic requests a simple type from the visitor client.
 boolean isListType()
           
 void visit(AbstractSimpleType target, AbstractSimpleType source, int level)
          The top event received when a simple type is encountered in the course of traversal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatatypeCollector

public DatatypeCollector(Schema schema,
                         java.util.Map<java.lang.String,SimpleType> simpleTypeMap)
Method Detail

getResult

public java.util.List<javax.xml.namespace.QName> getResult()

isListType

public boolean isListType()

visit

public void visit(AbstractSimpleType target,
                  AbstractSimpleType source,
                  int level)
Description copied from interface: SimpleTypeVisitor
The top event received when a simple type is encountered in the course of traversal.

Specified by:
visit in interface SimpleTypeVisitor
Parameters:
target - the target or "child" type
source - the source or "parent" type
level - the traversal level

getTopLevelSimpleType

public SimpleType getTopLevelSimpleType(javax.xml.namespace.QName name)
Description copied from interface: SimpleTypeVisitor
Since the the type hierarchy traversal will encounter qualified name references to many simple types, the traversal logic requests a simple type from the visitor client.

Specified by:
getTopLevelSimpleType in interface SimpleTypeVisitor
Parameters:
name - the qualified name of the simple type
Returns:
the top level simple type

getTargetNamespace

public java.lang.String getTargetNamespace()
Description copied from interface: SimpleTypeVisitor
Returns the target namespace for a particular schema instance.

Specified by:
getTargetNamespace in interface SimpleTypeVisitor
Returns:
the target namespace


Copyright © 2013. All Rights Reserved.