Package org.languagetool
Class RuleEntityResolver
java.lang.Object
org.languagetool.RuleEntityResolver
- All Implemented Interfaces:
EntityResolver
Resolves an XML file's external entity URIs as relative paths.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInputStreamLTEntities(String input) resolveEntity(String publicId, String systemId) Resolves the entity's absolute path by taking the relative path found in the source XML and combining it with the path of the source XML file (which also must be resolved to a full absolute path).
-
Constructor Details
-
RuleEntityResolver
public RuleEntityResolver()
-
-
Method Details
-
resolveEntity
Resolves the entity's absolute path by taking the relative path found in the source XML and combining it with the path of the source XML file (which also must be resolved to a full absolute path).- Specified by:
resolveEntityin interfaceEntityResolver- Parameters:
publicId- The public identifier of the external entity being referenced, or null if none was supplied.systemId- The system identifier of the external entity being referenced.- Returns:
- InputSource An InputSource constructed from the resolved path of the file the external entity points to
- Throws:
SAXExceptionIOException
-
getPathFromLTResourceFolder
-
getInputStreamLTEntities
-