|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectmaiolum.Edition
maiolum.xml.XMLEdition
Represents "metadata" like language, title, date and place of issue about logical units; these data are loaded from the XML file;
| Field Summary | |
protected static java.util.Vector |
availEditions
Vector of available Editions, i. e. |
private static org.apache.log4j.Logger |
logger
Logger associated with this class |
protected static java.lang.String |
URI
Current URI for the XML file containing language metadata. |
protected static org.w3c.dom.Document |
xmlEditions
DOM representation of the XML document, from which will be the Editions loaded |
| Fields inherited from class maiolum.Edition |
ID, locale, title, translator, year |
| Constructor Summary | |
XMLEdition()
Empty constructor. |
|
XMLEdition(java.io.File editionsFile)
Deprecated. |
|
XMLEdition(java.lang.String ID)
Creates new XMLEdition with given ID and retrieves available metadata (language, translator etc.) about this XMLEdition from the internal representation of the XML file with data |
|
| Method Summary | |
boolean |
equals(java.lang.Object o)
Indicates whether one XMLEdition is "equal to" another Object. |
Edition[] |
getAvailableEditions()
Returns array of available Editions, i. e. |
private java.lang.String |
getEditionElementChildValue(org.w3c.dom.Element elementNode,
java.lang.String elementName)
Returns String value of child element of <edition> elements. |
java.lang.String |
getURI()
Returns URI pointing to the location of XML file containing Editions metadata. |
protected void |
loadAvailableLocales()
Converts data contained in the DOM representation of data XML file to Edition objects. |
protected void |
loadXML(java.lang.String URI)
Loads XML file from location given by URI parameter. |
static void |
main(java.lang.String[] args)
|
private Edition |
setEditionData(Edition edition,
org.w3c.dom.Element el)
Returns new Edition, which is Edition
parameter with properties retrieved from children of the given <
code>Element.
|
private Edition |
setEditionData(Edition edition,
java.lang.String ID)
Returns new Edition, which is Edition
with specified ID, having properties retrieved from children of the
<edition> element corresponding to the given ID.
|
void |
setURI(java.lang.String URI)
Sets the URI (for example filename) of the XML file containing Editions metada. |
java.lang.String |
toString()
Returns |
| Methods inherited from class maiolum.Edition |
getID, getLocale, getTitle, getTranslator, getYear, setID, setLocale, setTitle, setTranslator, setYear |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static org.apache.log4j.Logger logger
protected static java.util.Vector availEditions
protected static java.lang.String URI
protected static org.w3c.dom.Document xmlEditions
| Constructor Detail |
public XMLEdition()
throws java.util.prefs.BackingStoreException
java.util.prefs.BackingStoreException - when Edition metadata could not be load.
public XMLEdition(java.io.File editionsFile)
throws java.util.prefs.BackingStoreException
public XMLEdition(java.lang.String ID)
throws java.util.prefs.BackingStoreException
| Method Detail |
public void setURI(java.lang.String URI)
java.lang.IllegalArgumentException - when languages metadata could not be load
from the specified URI.public java.lang.String getURI()
protected void loadXML(java.lang.String URI)
throws java.util.prefs.BackingStoreException
java.util.prefs.BackingStoreException - when XML file cannot be load or parsed properly.public Edition[] getAvailableEditions()
protected void loadAvailableLocales()
private java.lang.String getEditionElementChildValue(org.w3c.dom.Element elementNode,
java.lang.String elementName)
key = value
representation. See structure of editions.xml.
private Edition setEditionData(Edition edition,
java.lang.String ID)
throws java.util.prefs.BackingStoreException
Edition, which is Edition
with specified ID, having properties retrieved from children of the
<edition> element corresponding to the given ID.
If the Edition parameter is null,
properties are set on this variable.
This Element must be element <edition>,
and must have (by the languages.xml
id, lang, title, translator, year
java.util.prefs.BackingStoreException
private Edition setEditionData(Edition edition,
org.w3c.dom.Element el)
throws java.util.prefs.BackingStoreException
Edition, which is Edition
parameter with properties retrieved from children of the given <
code>Element.
If the Edition parameter is null,
new Edition is instantiated, properties are set and returned.
properties are set on this variable.
This Element must be element <edition>,
and must have (by the languages.xml
id, lang, title, translator, year
java.util.prefs.BackingStoreExceptionpublic boolean equals(java.lang.Object o)
Two XMLEdition objects are equal, when both are instances of XMLEdition class and all of their metadata attributes are equal.
public java.lang.String toString()
toString in class Edition
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||