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 String
CATALOG_NAMESPACE_10
static String
DQC_NAMESPACE_04
static org.jdom2.Namespace
ncmlNS
static String
NJ22_NAMESPACE
static String
XLINK_NAMESPACE
static org.jdom2.Namespace
xlinkNS
static org.jdom2.Namespace
xsiNS
-
Constructor Summary
Constructors Constructor Description XMLEntityResolver(boolean validate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
getDocumentBuilderFactoryVersion()
StringBuilder
getErrorMessages()
static String
getExternalSchemas()
StringBuilder
getFatalMessages()
org.jdom2.input.SAXBuilder
getSAXBuilder()
StringBuilder
getWarningMessages()
static void
initEntity(String entityName, String resourceName, String urlName)
Add an entity for resolution.InputSource
resolveEntity(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:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException
-
-