Package org.dlese.dpc.xml.schema
Class SchemaReader
java.lang.Object
org.dlese.dpc.xml.schema.SchemaReader
SchemaReader traverses an XML schema, which may be represented using multiple files, and extracts the key
schema elements (including Data Type definitions and global elements). These key schema elements are
represented as GlobalDefs and stored in a
GlobalDefMap which is keyed by element name.- Author:
- ostwald
-
Constructor Summary
ConstructorsConstructorDescriptionSchemaReader(org.dom4j.Document doc, URI source, DefinitionMiner definitionMiner, String defaultTargetNamespaceURI) Constructor for the SchemaReader object. -
Method Summary
Modifier and TypeMethodDescriptiongetGlobalDef(String typeName) Return globalDef from the globalDefMap after resolving the given typeName into a baseName and namespace.Gets the importPaths attribute of the SchemaReader objectReturns a list of the paths that are declared as "include"s for the givenDocumentbooleanvoidread()NOT YET DOCUMENTEDresolveToInstancePrefix(String prefix) static voidsetDebug(boolean bool)
-
Constructor Details
-
SchemaReader
public SchemaReader(org.dom4j.Document doc, URI source, DefinitionMiner definitionMiner, String defaultTargetNamespaceURI) throws SchemaHelperException Constructor for the SchemaReader object.- Parameters:
doc- NOT YET DOCUMENTEDsource- NOT YET DOCUMENTEDdefinitionMiner- NOT YET DOCUMENTEDdefaultTargetNamespaceURI- NOT YET DOCUMENTED- Throws:
SchemaHelperException- Description of the Exception
-
-
Method Details
-
getXsdPrefix
-
isBuiltIn
-
getNamespaces
-
getInstanceNamespaces
-
resolveToInstancePrefix
-
getLocation
-
read
NOT YET DOCUMENTED- Throws:
SchemaHelperException- NOT YET DOCUMENTED
-
getIncludePaths
Returns a list of the paths that are declared as "include"s for the givenDocument- Returns:
- an ArrayList containing the paths of all include schema files
-
getImportPaths
Gets the importPaths attribute of the SchemaReader object- Returns:
- The importPaths value
-
getGlobalDef
Return globalDef from the globalDefMap after resolving the given typeName into a baseName and namespace. Returns null if namespace cannot be determined. NOTE: this can be refactored to use getInstanceQualifiedName (returned prefix must be resolved into a namespace before the call to globalDefMap.getValue (baseName, namespace) -
getInstanceQualifiedName
-
setDebug
public static void setDebug(boolean bool)
-