|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ceryle.xml.HistoryManager
public class HistoryManager
Uses an XMLProcessor to provide access to a simple XML properties file that can be queried for named string lists. Similar to org.ceryle.xml.PropertyManager, each <property> element contains a name and value. The difference here is that the value is read or written as an Iterator containing zero or more Strings rather than a single value. For example:
<property name="findHistory">
<value>http://purl.org/ceryle/index.html</value>
<value>http://www.google.com/</value>
</property>
...
XMLProcessor| Field Summary | |
|---|---|
static String |
propElement
The name of the XML property element. |
static String |
propNameAttr
The name of the XML property name attribute. |
static String |
propValueElement
The name of the XML property value attribute. |
static String |
rootElement
The name of the XML root/document element. |
| Constructor Summary | |
|---|---|
HistoryManager(MessageHandler mh,
XMLProcessor xp,
String filename)
Constructor provided a String filename containing the pathname of the preferences file. |
|
| Method Summary | |
|---|---|
boolean |
isDirty()
Returns true if any properties have been modified since import of the history file. |
Iterator |
readProperty(String name)
Returns an Iterator (over a collection of Strings) as the value corresponding to the property name, null if unavailable or empty. |
void |
writeHistory(String filename)
Writes the current history document to a File named filename. |
boolean |
writeProperty(String name,
Iterator values)
Writes the property of String name with an Iterator value to the history file, returning true if the property replaced an existing value, false if the property did not exist prior. |
boolean |
writeProperty(String name,
Object value)
Writes the property of String name with an Object value to the history file, returning true if the property replaced an existing value, false if the property did not exist prior. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static String rootElement
public static String propElement
public static String propNameAttr
public static String propValueElement
| Constructor Detail |
|---|
public HistoryManager(MessageHandler mh,
XMLProcessor xp,
String filename)
throws FileNotFoundException,
ProcessException
FileNotFoundException
ProcessException| Method Detail |
|---|
public Iterator readProperty(String name)
public boolean writeProperty(String name,
Object value)
throws ProcessException
ProcessException
public boolean writeProperty(String name,
Iterator values)
throws ProcessException
ProcessExceptionpublic void writeHistory(String filename)
public boolean isDirty()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||