DLESE Tools
v1.6.0

org.dlese.dpc.xml.schema
Class GenericType

java.lang.Object
  extended by org.dlese.dpc.xml.schema.GenericType
All Implemented Interfaces:
GlobalDef
Direct Known Subclasses:
BuiltInType, SimpleType

public class GenericType
extends Object
implements GlobalDef

Wrapper for GenericType definitions (Element).

Author:
Jonathan Ostwald

Field Summary
protected  Element element
          NOT YET DOCUMENTED
protected  boolean inline
          NOT YET DOCUMENTED
protected  String location
          NOT YET DOCUMENTED
protected  String name
          NOT YET DOCUMENTED
protected  Namespace namespace
          NOT YET DOCUMENTED
protected  String path
          NOT YET DOCUMENTED
protected  SchemaReader schemaReader
          NOT YET DOCUMENTED
protected  String type
          NOT YET DOCUMENTED
protected  String xsdPrefix
          NOT YET DOCUMENTED
 
Fields inherited from interface org.dlese.dpc.xml.schema.GlobalDef
ATTRIBUTE_GROUP, BUILT_IN_TYPE, COMPLEX_TYPE, GENERIC_TYPE, GLOBAL_ATTRIBUTE, GLOBAL_DECLARATION, GLOBAL_ELEMENT, MODEL_GROUP, SIMPLE_TYPE
 
Constructor Summary
GenericType(Element element, String location, Namespace namespace, SchemaReader schemaReader)
          Constructor - accounting for location and schemaReader.
GenericType(String name)
          Constructor for the GenericType object
GenericType(String name, Namespace namespace)
          Constructor for the GenericType object
 
Method Summary
 void extractDocumentation()
          Find documentation within this type definition.
 void filterChildren(String qualifiedElementName)
          Removes all elements of type elementName
 void filterChildren(String qualifiedElementName, Element parent)
          NOT YET DOCUMENTED
 List getChildren()
          Returns (filtered) list of child elements
 int getDataType()
          Gets the dataType attribute of the GenericType object
 String getDocumentation()
          Gets the documentation attribute of the GenericType object
 Element getElement()
          Gets the element attribute of the GenericType object
 String getElementAsXml()
          Gets the elementAsXml attribute of the GenericType object
 List getEnumerationValues()
          Gets the enumerationValues attribute of the GenericType object
 List getEnumerationValues(boolean getLeafValues)
          Gets the enumerationValues attribute of the GenericType object
 Element getFirstChild()
          Gets the firstChild attribute of the GenericType object
 String getLocation()
          Gets the location attribute of the GenericType object
 String getName()
          Gets the name attribute of the GenericType object
 Namespace getNamespace()
          Gets the namespace attribute of the GenericType object
 String getQualifiedInstanceName()
          Gets a qualified name using the prefix for namespace as defined at the INSTANCE level.
 String getQualifiedName()
          Gets the qualifiedName attribute of the GenericType object
 SchemaReader getSchemaReader()
          Gets the schemaReader attribute of the GenericType object
 String getType()
          Gets the type attribute of the GenericType object
 String getXsdPrefix()
          The xsdPrefix is the prefix (e.g., "xsd") used to refer to the Schema Datatype namespace (htp:/www.w3.org/2001/XMLSchema.
 boolean isAnyType()
           
 boolean isAttributeGroup()
          Gets the attributeGroup attribute of the GenericType object
 boolean isBuiltIn()
          Gets the builtIn attribute of the GenericType object
 boolean isComplexType()
          Gets the complexType attribute of the GenericType object
 boolean isEnumerationType()
          Gets the enumerationType attribute of the GenericType object
 boolean isGlobalAttribute()
          Gets the globalAttribute attribute of the GenericType object
 boolean isGlobalDeclaration()
          Gets the globalDeclaration attribute of the GenericType object
 boolean isGlobalElement()
          Gets the globalElement attribute of the GenericType object
 boolean isInline()
          Is this definition explicitly named or is in an "inline" definition (i.e., not explicitly named).
 boolean isModelGroup()
          Gets the modelGroup attribute of the GenericType object
 boolean isSimpleType()
          Gets the simpleType attribute of the GenericType object
 boolean isTypeDef()
          All instances of GenericType are type definitions.
 void printElements()
          NOT YET DOCUMENTED
protected static void prtln(String s)
          NOT YET DOCUMENTED
 void setInline(boolean bool)
          Sets the inline attribute of the GenericType object
 String toString()
          NOT YET DOCUMENTED
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
NOT YET DOCUMENTED


location

protected String location
NOT YET DOCUMENTED


element

protected Element element
NOT YET DOCUMENTED


path

protected String path
NOT YET DOCUMENTED


type

protected String type
NOT YET DOCUMENTED


namespace

protected Namespace namespace
NOT YET DOCUMENTED


xsdPrefix

protected String xsdPrefix
NOT YET DOCUMENTED


schemaReader

protected SchemaReader schemaReader
NOT YET DOCUMENTED


inline

protected boolean inline
NOT YET DOCUMENTED

Constructor Detail

GenericType

public GenericType(String name)
Constructor for the GenericType object

Parameters:
name - NOT YET DOCUMENTED

GenericType

public GenericType(String name,
                   Namespace namespace)
Constructor for the GenericType object

Parameters:
name - NOT YET DOCUMENTED
namespace - NOT YET DOCUMENTED

GenericType

public GenericType(Element element,
                   String location,
                   Namespace namespace,
                   SchemaReader schemaReader)
Constructor - accounting for location and schemaReader.

Parameters:
element - NOT YET DOCUMENTED
location - NOT YET DOCUMENTED
namespace - NOT YET DOCUMENTED
schemaReader - NOT YET DOCUMENTED
Method Detail

extractDocumentation

public void extractDocumentation()
Find documentation within this type definition.


isTypeDef

public boolean isTypeDef()
All instances of GenericType are type definitions.

Specified by:
isTypeDef in interface GlobalDef
Returns:
true

isInline

public boolean isInline()
Is this definition explicitly named or is in an "inline" definition (i.e., not explicitly named).

Returns:
true if this type definition is defined "inline"

setInline

public void setInline(boolean bool)
Sets the inline attribute of the GenericType object

Parameters:
bool - The new inline value

isSimpleType

public boolean isSimpleType()
Gets the simpleType attribute of the GenericType object

Specified by:
isSimpleType in interface GlobalDef
Returns:
The simpleType value

isComplexType

public boolean isComplexType()
Gets the complexType attribute of the GenericType object

Specified by:
isComplexType in interface GlobalDef
Returns:
The complexType value

getXsdPrefix

public String getXsdPrefix()
The xsdPrefix is the prefix (e.g., "xsd") used to refer to the Schema Datatype namespace (htp:/www.w3.org/2001/XMLSchema.

Returns:
The xsdPrefix value

getSchemaReader

public SchemaReader getSchemaReader()
Gets the schemaReader attribute of the GenericType object

Specified by:
getSchemaReader in interface GlobalDef
Returns:
The schemaReader value

isGlobalDeclaration

public boolean isGlobalDeclaration()
Gets the globalDeclaration attribute of the GenericType object

Specified by:
isGlobalDeclaration in interface GlobalDef
Returns:
The globalDeclaration value

isGlobalElement

public boolean isGlobalElement()
Gets the globalElement attribute of the GenericType object

Specified by:
isGlobalElement in interface GlobalDef
Returns:
The globalElement value

isGlobalAttribute

public boolean isGlobalAttribute()
Gets the globalAttribute attribute of the GenericType object

Specified by:
isGlobalAttribute in interface GlobalDef
Returns:
The globalAttribute value

isAttributeGroup

public boolean isAttributeGroup()
Gets the attributeGroup attribute of the GenericType object

Specified by:
isAttributeGroup in interface GlobalDef
Returns:
The attributeGroup value

isBuiltIn

public boolean isBuiltIn()
Gets the builtIn attribute of the GenericType object

Specified by:
isBuiltIn in interface GlobalDef
Returns:
The builtIn value

isAnyType

public boolean isAnyType()
Specified by:
isAnyType in interface GlobalDef

isModelGroup

public boolean isModelGroup()
Gets the modelGroup attribute of the GenericType object

Specified by:
isModelGroup in interface GlobalDef
Returns:
The modelGroup value

getDataType

public int getDataType()
Gets the dataType attribute of the GenericType object

Specified by:
getDataType in interface GlobalDef
Returns:
The dataType value

getType

public String getType()
Gets the type attribute of the GenericType object

Specified by:
getType in interface GlobalDef
Returns:
The type value

getName

public String getName()
Gets the name attribute of the GenericType object

Specified by:
getName in interface GlobalDef
Returns:
The name value

getQualifiedName

public String getQualifiedName()
Gets the qualifiedName attribute of the GenericType object

Specified by:
getQualifiedName in interface GlobalDef
Returns:
The qualifiedName value

getQualifiedInstanceName

public String getQualifiedInstanceName()
Gets a qualified name using the prefix for namespace as defined at the INSTANCE level.

NOTE: in some cases namespaces occurring in included schemas may not be defined at the instance level!

Specified by:
getQualifiedInstanceName in interface GlobalDef
Returns:
The qualifiedInstanceName value

getNamespace

public Namespace getNamespace()
Gets the namespace attribute of the GenericType object

Specified by:
getNamespace in interface GlobalDef
Returns:
The namespace value

getLocation

public String getLocation()
Gets the location attribute of the GenericType object

Specified by:
getLocation in interface GlobalDef
Returns:
The location value

getElement

public Element getElement()
Gets the element attribute of the GenericType object

Specified by:
getElement in interface GlobalDef
Returns:
The element value

getElementAsXml

public String getElementAsXml()
Gets the elementAsXml attribute of the GenericType object

Specified by:
getElementAsXml in interface GlobalDef
Returns:
The elementAsXml value

toString

public String toString()
NOT YET DOCUMENTED

Specified by:
toString in interface GlobalDef
Overrides:
toString in class Object
Returns:
NOT YET DOCUMENTED

filterChildren

public void filterChildren(String qualifiedElementName)
Removes all elements of type elementName

Parameters:
qualifiedElementName - NOT YET DOCUMENTED

filterChildren

public void filterChildren(String qualifiedElementName,
                           Element parent)
NOT YET DOCUMENTED

Parameters:
qualifiedElementName - NOT YET DOCUMENTED
parent - NOT YET DOCUMENTED

getFirstChild

public Element getFirstChild()
Gets the firstChild attribute of the GenericType object

Returns:
The firstChild value

getChildren

public List getChildren()
Returns (filtered) list of child elements

Returns:
The children value

getDocumentation

public String getDocumentation()
Gets the documentation attribute of the GenericType object

Specified by:
getDocumentation in interface GlobalDef
Returns:
The documentation value

isEnumerationType

public boolean isEnumerationType()
Gets the enumerationType attribute of the GenericType object

Returns:
The enumerationType value

getEnumerationValues

public List getEnumerationValues()
Gets the enumerationValues attribute of the GenericType object

Returns:
The enumerationValues value

getEnumerationValues

public List getEnumerationValues(boolean getLeafValues)
Gets the enumerationValues attribute of the GenericType object

Parameters:
getLeafValues - NOT YET DOCUMENTED
Returns:
The enumerationValues value

printElements

public void printElements()
NOT YET DOCUMENTED


prtln

protected static void prtln(String s)
NOT YET DOCUMENTED

Parameters:
s - NOT YET DOCUMENTED

DLESE Tools
v1.6.0