Package org.languagetool
Class XMLValidator.EntityAsInput
java.lang.Object
org.languagetool.XMLValidator.EntityAsInput
- All Implemented Interfaces:
LSInput
- Enclosing class:
XMLValidator
Defines an input source based on the correct path to external entities.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate URLprivate InputStreamprivate Stringprivate RuleEntityResolverprivate String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetBaseURI(String baseURI) voidsetByteStream(InputStream inputStream) voidsetCertifiedText(boolean certifiedText) voidsetCharacterStream(Reader characterStream) voidsetEncoding(String encoding) voidSet InputStream from the value of the entities URL.voidsetPublicId(String publicId) Compute absolute path to entities file from source XML URL and relative path (systemId param).voidsetStringData(String stringData) voidsetSystemId(String systemId) Compute absolute path to entities file from source XML URL and relative path (systemId param).
-
Field Details
-
ruleEntityResolver
-
systemId
-
publicId
-
inputStream
-
entitiesUrl
-
-
Constructor Details
-
EntityAsInput
- Parameters:
publicId- from outer context, entity URIsystemId- from outer context, entity URI (if you ask me the precise difference between publicId and systemId I will cry)- Throws:
IOException
-
-
Method Details
-
getCharacterStream
- Specified by:
getCharacterStreamin interfaceLSInput
-
setCharacterStream
- Specified by:
setCharacterStreamin interfaceLSInput
-
getByteStream
- Specified by:
getByteStreamin interfaceLSInput
-
setByteStream
- Specified by:
setByteStreamin interfaceLSInput
-
getStringData
- Specified by:
getStringDatain interfaceLSInput
-
getInputStream
-
setInputStream
Set InputStream from the value of the entities URL.- Throws:
IOException- if the file pointed to is invalid, or we end up getting an unreadable stream from it some other way
-
setStringData
- Specified by:
setStringDatain interfaceLSInput
-
getSystemId
- Specified by:
getSystemIdin interfaceLSInput
-
setSystemId
Compute absolute path to entities file from source XML URL and relative path (systemId param).- Specified by:
setSystemIdin interfaceLSInput- Parameters:
systemId- relative URI pointing to entity file
-
getPublicId
- Specified by:
getPublicIdin interfaceLSInput
-
setPublicId
Compute absolute path to entities file from source XML URL and relative path (systemId param).- Specified by:
setPublicIdin interfaceLSInput- Parameters:
publicId- relative URI pointing to entity file
-
getBaseURI
- Specified by:
getBaseURIin interfaceLSInput
-
setBaseURI
- Specified by:
setBaseURIin interfaceLSInput
-
getEncoding
- Specified by:
getEncodingin interfaceLSInput
-
setEncoding
- Specified by:
setEncodingin interfaceLSInput
-
getCertifiedText
public boolean getCertifiedText()- Specified by:
getCertifiedTextin interfaceLSInput
-
setCertifiedText
public void setCertifiedText(boolean certifiedText) - Specified by:
setCertifiedTextin interfaceLSInput
-