Class XMLValidator.EntityAsInput

java.lang.Object
org.languagetool.XMLValidator.EntityAsInput
All Implemented Interfaces:
LSInput
Enclosing class:
XMLValidator

static class XMLValidator.EntityAsInput extends Object implements LSInput
Defines an input source based on the correct path to external entities.
  • Field Details

    • ruleEntityResolver

      private RuleEntityResolver ruleEntityResolver
    • systemId

      private String systemId
    • publicId

      private String publicId
    • inputStream

      private InputStream inputStream
    • entitiesUrl

      private URL entitiesUrl
  • Constructor Details

    • EntityAsInput

      public EntityAsInput(String publicId, String systemId) throws IOException
      Parameters:
      publicId - from outer context, entity URI
      systemId - from outer context, entity URI (if you ask me the precise difference between publicId and systemId I will cry)
      Throws:
      IOException
  • Method Details

    • getCharacterStream

      public Reader getCharacterStream()
      Specified by:
      getCharacterStream in interface LSInput
    • setCharacterStream

      public void setCharacterStream(Reader characterStream)
      Specified by:
      setCharacterStream in interface LSInput
    • getByteStream

      public InputStream getByteStream()
      Specified by:
      getByteStream in interface LSInput
    • setByteStream

      public void setByteStream(InputStream inputStream)
      Specified by:
      setByteStream in interface LSInput
    • getStringData

      public String getStringData()
      Specified by:
      getStringData in interface LSInput
    • getInputStream

      public InputStream getInputStream()
    • setInputStream

      public void setInputStream() throws IOException
      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

      public void setStringData(String stringData)
      Specified by:
      setStringData in interface LSInput
    • getSystemId

      public String getSystemId()
      Specified by:
      getSystemId in interface LSInput
    • setSystemId

      public void setSystemId(String systemId)
      Compute absolute path to entities file from source XML URL and relative path (systemId param).
      Specified by:
      setSystemId in interface LSInput
      Parameters:
      systemId - relative URI pointing to entity file
    • getPublicId

      public String getPublicId()
      Specified by:
      getPublicId in interface LSInput
    • setPublicId

      public void setPublicId(String publicId)
      Compute absolute path to entities file from source XML URL and relative path (systemId param).
      Specified by:
      setPublicId in interface LSInput
      Parameters:
      publicId - relative URI pointing to entity file
    • getBaseURI

      public String getBaseURI()
      Specified by:
      getBaseURI in interface LSInput
    • setBaseURI

      public void setBaseURI(String baseURI)
      Specified by:
      setBaseURI in interface LSInput
    • getEncoding

      public String getEncoding()
      Specified by:
      getEncoding in interface LSInput
    • setEncoding

      public void setEncoding(String encoding)
      Specified by:
      setEncoding in interface LSInput
    • getCertifiedText

      public boolean getCertifiedText()
      Specified by:
      getCertifiedText in interface LSInput
    • setCertifiedText

      public void setCertifiedText(boolean certifiedText)
      Specified by:
      setCertifiedText in interface LSInput