- 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 toLangResourceContentHandler,LangResourceErrorHandlerandLangResourceXMLFilter- Since:
- 1.0.0
- Version:
- "1.0.13" - b202005081200L
- Author:
- Julien Seinturier - COMEX S.A. - contact@jorigin.org - https://github.com/jorigin/jeometry
-
-
Field Summary
Fields Modifier and Type Field Description protected EventListenerListidListenerListprotected LangResourceresource
-
Constructor Summary
Constructors Constructor Description LangResourceXMLReader()Create a new XML language resource reader.LangResourceXMLReader(String uri)Create a new XML language resource reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HashMap<String,String>getParsedLangResource(String uri)Get the language resources read from the XML document where URI is given in parameter.LangResourcegetResource()Get thelanguage resourceread by this object.StringgetUri()Get the URI of the the XML document to read.booleanisWorking()Get if the reader is currently working.voidsetUri(String uri)Set the URI of the the XML document to read.
-
-
-
Field Detail
-
idListenerList
protected EventListenerList idListenerList
-
resource
protected LangResource resource
-
-
Constructor Detail
-
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 Detail
-
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()
-
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:
setUri(String)
-
getResource
public LangResource getResource()
Get thelanguage resourceread by this object.- Returns:
- the
language resourceread by this object.
-
isWorking
public boolean isWorking()
Get if the reader is currently working.- Returns:
trueif the reader is currently working andfalseotherwise.
-
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.
-
-