Class LangResourceXMLReader

java.lang.Object
org.jorigin.lang.xml.LangResourceXMLReader

public class LangResourceXMLReader extends Object
A XML reader used for handling XML language resource files. This reader delegates processing to LangResourceContentHandler, LangResourceErrorHandler and LangResourceXMLFilter
Since:
1.0.0
Version:
"1.0.14" - b202111241200L
Author:
Julien SEINTURIER - Université de Toulon / CNRS LIS umr 7020 - github.com/jorigin/jcommon (contact@jorigin.org)
  • Field Details

    • idListenerList

      protected EventListenerList idListenerList
      The attached listeners.
    • resource

      protected LangResource resource
      The underlying lang resource.
  • Constructor Details

    • LangResourceXMLReader

      public LangResourceXMLReader()
      Create a new XML language resource reader.
    • LangResourceXMLReader

      public LangResourceXMLReader(String uri)
      Create a new XML language resource reader.
      Parameters:
      uri - the uri of the XML document to read.
  • Method Details

    • setUri

      public void setUri(String uri)
      Set the URI of the the XML document to read.
      Parameters:
      uri - the URI of the the XML document to read.
      See Also:
    • getUri

      public String getUri()
      Get the URI of the the XML document to read.
      Returns:
      the URI of the the XML document to read.
      See Also:
    • getResource

      public LangResource getResource()
      Get the language resource read by this object.
      Returns:
      the language resource read by this object.
    • isWorking

      public boolean isWorking()
      Get if the reader is currently working.
      Returns:
      true if the reader is currently working and false otherwise.
    • getParsedLangResource

      public HashMap<String,String> getParsedLangResource(String uri) throws IOException
      Get the language resources read from the XML document where URI is given in parameter.
      Parameters:
      uri - the URI of the XML document than contains the language resources.
      Returns:
      the language resources.
      Throws:
      IOException - if an error occurs.