Package com.sun.tools.ws.wsdl.parser
Class DOMForest
- java.lang.Object
-
- com.sun.tools.ws.wsdl.parser.DOMForest
-
- Direct Known Subclasses:
MetadataFinder
public class DOMForest extends Object
- Author:
- Vivek Pandey
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceDOMForest.Handler
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Document>coreactual data storage map<SystemId,Document>.protected EntityResolverentityResolverprotected ErrorReceivererrorReceiverprotected Set<String>externalReferencesContains wsdl:import(s)protected List<Element>inlinedSchemaElementsinlined schema elements inside wsdl:type sectionLocatorTablelocatorTableStores location information for all the trees in this forest.protected InternalizationLogiclogicSchema language dependent part of the processing.protected WsimportOptionsoptionsSet<Element>outerMostBindingsStores all the outer-most <jaxb:bindings> customizations.protected Map<String,String>resolvedCacheprotected Set<String>rootDocumentsTo correctly feed documents to a schema parser, we need to remember which documents (of the forest) were given as the root documents, and which of them are read as included/imported documents.
-
Constructor Summary
Constructors Constructor Description DOMForest(InternalizationLogic logic, EntityResolver entityResolver, WsimportOptions options, ErrorReceiver errReceiver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddExternalReferences(String ref)voiddump(OutputStream out)Dumps the contents of the forest to the specified stream.Documentget(String systemId)Gets the DOM tree associated with the specified system ID, or null if none is found.Set<String>getExternalReferences()StringgetFirstRootDocument()Gets the first one (which is more or less random) inrootDocuments.List<Element>getInlinedSchemaElement()Map<String,String>getReferencedEntityMap()Set<String>getRootDocuments()StringgetSystemId(Document dom)Gets the system ID from which the given DOM is parsed.String[]listSystemIDs()Gets all the system IDs of the documents.Documentparse(String systemId, boolean root)Parses an XML at the given location ( and XMLs referenced by it) into DOM trees and stores them to this forest.Documentparse(InputSource source, boolean root)
-
-
-
Field Detail
-
rootDocuments
protected final Set<String> rootDocuments
To correctly feed documents to a schema parser, we need to remember which documents (of the forest) were given as the root documents, and which of them are read as included/imported documents. Set of system ids as strings.
-
errorReceiver
protected final ErrorReceiver errorReceiver
-
inlinedSchemaElements
protected final List<Element> inlinedSchemaElements
inlined schema elements inside wsdl:type section
-
locatorTable
public final LocatorTable locatorTable
Stores location information for all the trees in this forest.
-
entityResolver
protected final EntityResolver entityResolver
-
outerMostBindings
public final Set<Element> outerMostBindings
Stores all the outer-most <jaxb:bindings> customizations.
-
logic
protected final InternalizationLogic logic
Schema language dependent part of the processing.
-
options
protected final WsimportOptions options
-
-
Constructor Detail
-
DOMForest
public DOMForest(InternalizationLogic logic, @NotNull EntityResolver entityResolver, WsimportOptions options, ErrorReceiver errReceiver)
-
-
Method Detail
-
parse
@NotNull public Document parse(InputSource source, boolean root) throws SAXException, IOException
- Throws:
SAXExceptionIOException
-
parse
public Document parse(String systemId, boolean root) throws SAXException, IOException
Parses an XML at the given location ( and XMLs referenced by it) into DOM trees and stores them to this forest.- Returns:
- the parsed DOM document object.
- Throws:
SAXExceptionIOException
-
addExternalReferences
public void addExternalReferences(String ref)
-
get
public Document get(String systemId)
Gets the DOM tree associated with the specified system ID, or null if none is found.
-
listSystemIDs
public String[] listSystemIDs()
Gets all the system IDs of the documents.
-
getSystemId
public String getSystemId(Document dom)
Gets the system ID from which the given DOM is parsed. Poor-man's base URI.
-
getFirstRootDocument
public String getFirstRootDocument()
Gets the first one (which is more or less random) inrootDocuments.
-
dump
public void dump(OutputStream out) throws IOException
Dumps the contents of the forest to the specified stream. This is a debug method. As such, error handling is sloppy.- Throws:
IOException
-
-