Package org.smooks.xml
Class LocalEntityResolver
- java.lang.Object
-
- org.smooks.xml.LocalEntityResolver
-
- All Implemented Interfaces:
EntityResolver
- Direct Known Subclasses:
LocalDTDEntityResolver
,LocalXSDEntityResolver
public abstract class LocalEntityResolver extends Object implements EntityResolver
XSD resolver for local XSD's.- Author:
- tfennelly
-
-
Constructor Summary
Constructors Constructor Description LocalEntityResolver(File localEntityFolder)
Public default ConstructorLocalEntityResolver(String entityCPLocation)
Public Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
clearEntityCache()
Clear the entity cache.String
getDocType()
Get the document type.InputSource
resolveEntity(String publicId, String systemId)
void
setDocType(String docType)
Set the document type for the resolver.
-
-
-
Constructor Detail
-
LocalEntityResolver
public LocalEntityResolver(String entityCPLocation)
Public Constructor.- Parameters:
entityCPLocation
- Entity classpath location.
-
LocalEntityResolver
public LocalEntityResolver(File localEntityFolder)
Public default Constructor This constructor allows specification of a local file system folder from which Entitys can be loaded.- Parameters:
localEntityFolder
- Local Entity folder.
-
-
Method Detail
-
resolveEntity
public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
- Specified by:
resolveEntity
in interfaceEntityResolver
- Throws:
SAXException
IOException
-
clearEntityCache
public static void clearEntityCache()
Clear the entity cache.
-
getDocType
public String getDocType()
Get the document type. This is a bit of a hack. There's a way of getting the DOM parser to populate the DocumentType.- Returns:
- The Document type (systemId).
-
setDocType
public void setDocType(String docType)
Set the document type for the resolver.- Parameters:
docType
- Primary document type.
-
-