Package thredds.catalog
Class XMLEntityResolver
- java.lang.Object
-
- thredds.catalog.XMLEntityResolver
-
- All Implemented Interfaces:
EntityResolver
public class XMLEntityResolver extends Object implements EntityResolver
Handles the interaction with JAXP, resolving dtd, schemas locally if possible. Get a javax.xml.parsers.DocumentBuilder from here, allows you to validate or not.The Crimson parser wont do schema validation. NOTE: OLD AND CRUFTY
-
-
Field Summary
Fields Modifier and Type Field Description static StringCATALOG_NAMESPACE_10static StringDQC_NAMESPACE_04static org.jdom2.NamespacencmlNSstatic StringNJ22_NAMESPACEstatic StringXLINK_NAMESPACEstatic org.jdom2.NamespacexlinkNSstatic org.jdom2.NamespacexsiNS
-
Constructor Summary
Constructors Constructor Description XMLEntityResolver(boolean validate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringgetDocumentBuilderFactoryVersion()StringBuildergetErrorMessages()static StringgetExternalSchemas()StringBuildergetFatalMessages()org.jdom2.input.SAXBuildergetSAXBuilder()StringBuildergetWarningMessages()static voidinitEntity(String entityName, String resourceName, String urlName)Add an entity for resolution.InputSourceresolveEntity(String publicId, String systemId)
-
-
-
Field Detail
-
CATALOG_NAMESPACE_10
public static final String CATALOG_NAMESPACE_10
- See Also:
- Constant Field Values
-
DQC_NAMESPACE_04
public static final String DQC_NAMESPACE_04
- See Also:
- Constant Field Values
-
NJ22_NAMESPACE
public static final String NJ22_NAMESPACE
- See Also:
- Constant Field Values
-
ncmlNS
public static final org.jdom2.Namespace ncmlNS
-
XLINK_NAMESPACE
public static final String XLINK_NAMESPACE
- See Also:
- Constant Field Values
-
xlinkNS
public static final org.jdom2.Namespace xlinkNS
-
xsiNS
public static final org.jdom2.Namespace xsiNS
-
-
Method Detail
-
getExternalSchemas
public static String getExternalSchemas()
-
initEntity
public static void initEntity(String entityName, String resourceName, String urlName)
Add an entity for resolution. Specify a local resource, and/or a URL. Look for the local Resource first.- Parameters:
entityName- name of entity, eg the namespace StringresourceName- resolve using this Resource, found on the class pathurlName- resolve using this Resource, found on the class path
-
getDocumentBuilderFactoryVersion
public static String getDocumentBuilderFactoryVersion()
-
getSAXBuilder
public org.jdom2.input.SAXBuilder getSAXBuilder()
-
getWarningMessages
public StringBuilder getWarningMessages()
-
getErrorMessages
public StringBuilder getErrorMessages()
-
getFatalMessages
public StringBuilder getFatalMessages()
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
- Specified by:
resolveEntityin interfaceEntityResolver- Throws:
SAXExceptionIOException
-
-