Package org.dlese.dpc.xml.schema
Class GlobalElement
java.lang.Object
org.dlese.dpc.xml.schema.GlobalDeclaration
org.dlese.dpc.xml.schema.GlobalElement
- All Implemented Interfaces:
GlobalDef
Wrapper for global element definitions in an XML Schema, which are defined as an immediate child of the
schema element.
Global element definitions have an XPath of the form "/<xsd:schema/<xsd:element ...>", where the "xsd" prefix refers to a prefix that is mapped to the W3C Schema for Datatype Definitions (having a namespace uri of "http://www.w3.org/2001/XMLSchema").
GlobalElement definitions are associated with a type in one of the following ways:
- via a "type" attribute,
- via a "ref" attribute
- via an in-line type definition
- Version:
- $Id: GlobalElement.java,v 1.7 2009/03/20 23:34:01 jweather Exp $
- Author:
- Jonathan Ostwald
-
Field Summary
Fields inherited from class org.dlese.dpc.xml.schema.GlobalDeclaration
debug, documentation, element, location, name, namespace, schemaReader, type, xsdPrefixFields 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
ConstructorsConstructorDescriptionGlobalElement(org.dom4j.Element element, String location, org.dom4j.Namespace namespace, SchemaReader schemaReader) Constructor for the GlobalElement object -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSubstitutionGroupMember(GlobalElement typeDef) NOTE: substitutionGroupMembers must have the same type as head or be derived from head's typeintGets the dataType attribute of the GlobalElement objectbooleanbooleanbooleanbooleantoString()NOT YET DOCUMENTEDMethods inherited from class org.dlese.dpc.xml.schema.GlobalDeclaration
extractDocumentation, getDocumentation, getElement, getElementAsXml, getLocation, getName, getNamespace, getQualifiedInstanceName, getQualifiedName, getSchemaReader, getType, isAnyType, isAttributeGroup, isBuiltIn, isComplexType, isGlobalAttribute, isGlobalDeclaration, isGlobalElement, isModelGroup, isSimpleType, isTypeDef, prtln, prtlnErr
-
Constructor Details
-
GlobalElement
public GlobalElement(org.dom4j.Element element, String location, org.dom4j.Namespace namespace, SchemaReader schemaReader) Constructor for the GlobalElement object- Parameters:
element- NOT YET DOCUMENTEDlocation- NOT YET DOCUMENTEDnamespace- NOT YET DOCUMENTED
-
-
Method Details
-
getDataType
public int getDataType()Gets the dataType attribute of the GlobalElement object- Specified by:
getDataTypein interfaceGlobalDef- Overrides:
getDataTypein classGlobalDeclaration- Returns:
- The dataType value
-
isAbstract
public boolean isAbstract() -
isHeadElement
public boolean isHeadElement() -
isSubstitutionGroupMember
public boolean isSubstitutionGroupMember() -
hasSubstitutionGroup
public boolean hasSubstitutionGroup() -
getSubstitutionGroup
-
addSubstitutionGroupMember
NOTE: substitutionGroupMembers must have the same type as head or be derived from head's type -
toString
NOT YET DOCUMENTED- Specified by:
toStringin interfaceGlobalDef- Overrides:
toStringin classGlobalDeclaration- Returns:
- NOT YET DOCUMENTED
-