public class ModelBuilder extends Object
DTDEventHandler
, which provides access to all the declarations.Constructor and Description |
---|
ModelBuilder(DTDEventHandler _dtdInfo,
String _dtdTitle)
Creates a new instance of ModelBuilder.
|
ModelBuilder(DtdSpecifier _dtdSpec,
String[] _roots,
org.apache.xml.resolver.tools.CatalogResolver _resolver)
Constructor.
|
ModelBuilder(DtdSpecifier _dtdSpec,
String[] _roots,
org.apache.xml.resolver.tools.CatalogResolver _resolver,
boolean _debug)
Constructor; allows you to set the debug flag
|
Modifier and Type | Method and Description |
---|---|
void |
addRoots(String[] roots)
Add a list of root elements.
|
void |
findReachable()
Finds all the reachable elements, given a list of roots.
|
Attributes |
getAttributes()
Returns all attribute declarations
|
String[] |
getContext(String elementName)
Returns the context of a specified element (in other words, the elements
in which the specified element may appear)
|
DtdModule |
getDtdModule()
Returns the DtdModule associated with this DTD.
|
String |
getDtdTitle()
Returns the DTD title which will either come from the structured annotation within
the top-level DTD module, or else the command line.
|
Elements |
getElements()
Returns all element declarations
|
Entities |
getEntities()
Returns all entity declarations
|
SComments |
getSComments()
Returns all the structured comments.
|
boolean |
hasRoots()
Returns true if there are any elements known to be specified as root elements
|
void |
setDebug()
Sets debug to true.
|
public ModelBuilder(DtdSpecifier _dtdSpec, String[] _roots, org.apache.xml.resolver.tools.CatalogResolver _resolver)
public ModelBuilder(DtdSpecifier _dtdSpec, String[] _roots, org.apache.xml.resolver.tools.CatalogResolver _resolver, boolean _debug)
public ModelBuilder(DTDEventHandler _dtdInfo, String _dtdTitle)
_dtdInfo
- Provides all the information about the DTD, that was gathered during
parsing._dtdTitle
- If not null, this will override any title that was given in the
top-level DTD structured comment.public String getDtdTitle()
public Attributes getAttributes()
public String[] getContext(String elementName)
elementName
- Element for which the context is requestedpublic DtdModule getDtdModule()
public Elements getElements()
public Entities getEntities()
public SComments getSComments()
public void setDebug()
public void addRoots(String[] roots) throws Exception
Exception
public boolean hasRoots()