|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.cosylab.application.state.impl.DefaultStateStorage com.cosylab.application.state.impl.XMLStateStorage
public class XMLStateStorage
This class is an implementation of the StateStorage
that uses a
XML file to store the array of the State
objects.
Use the csl.XMLStateStorage.useNew=true
system property to switch
to the new implementation of the state storage (faster, with nicer output, uses SAX instead of DOM).
Field Summary |
---|
Fields inherited from class com.cosylab.application.state.impl.DefaultStateStorage |
---|
delegate, states |
Constructor Summary | |
---|---|
XMLStateStorage()
|
|
XMLStateStorage(StateStorage ss)
Creates a new XMLStateStorage object. |
Method Summary | |
---|---|
void |
add(State state)
Adds new state to storage. |
void |
addAll(java.util.List states)
DOCUMENT ME! |
boolean |
contains(State st)
DOCUMENT ME! |
boolean |
equals(java.lang.Object obj)
|
java.util.List |
getStates()
DOCUMENT ME! |
int |
hashCode()
|
java.util.Iterator |
iterator()
Rerurns iterator over states. |
void |
load(java.io.InputStream stream)
DOCUMENT ME! |
void |
load(java.lang.String filePath,
java.lang.String applicationName)
DOCUMENT ME! TODO: Add load(InputStream, String) to support loading from non-file sources! |
static State[] |
loadStates(org.xml.sax.InputSource is)
DOCUMENT ME! |
void |
remove(State st)
DOCUMENT ME! |
void |
store(java.io.OutputStream stream)
DOCUMENT ME! |
void |
store(java.lang.String filePath,
java.lang.String applicationName)
DOCUMENT ME! |
static void |
storeStates(State[] outStates,
java.io.OutputStream os)
DOCUMENT ME! |
java.lang.String |
toString()
|
Methods inherited from class com.cosylab.application.state.impl.DefaultStateStorage |
---|
getInputStream, getOutputStream |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XMLStateStorage()
public XMLStateStorage(StateStorage ss)
ss
- DOCUMENT ME!Method Detail |
---|
public static final State[] loadStates(org.xml.sax.InputSource is) throws java.io.IOException
is
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public static final void storeStates(State[] outStates, java.io.OutputStream os) throws java.io.IOException
outStates
- DOCUMENT ME!os
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public void add(State state)
StateStorage
add
in interface StateStorage
add
in class DefaultStateStorage
state
- the state to be addedpublic void addAll(java.util.List states)
StateStorage
addAll
in interface StateStorage
addAll
in class DefaultStateStorage
states
- DOCUMENT ME!public boolean contains(State st)
StateStorage
contains
in interface StateStorage
contains
in class DefaultStateStorage
st
- DOCUMENT ME!
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.List getStates()
StateStorage
getStates
in interface StateStorage
getStates
in class DefaultStateStorage
public int hashCode()
hashCode
in class java.lang.Object
public java.util.Iterator iterator()
StateStorage
iterator
in interface StateStorage
iterator
in class DefaultStateStorage
public void load(java.io.InputStream stream) throws java.io.IOException
StateStorage
stream
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public void load(java.lang.String filePath, java.lang.String applicationName) throws java.io.IOException
StateStorage
load
in interface StateStorage
load
in class DefaultStateStorage
filePath
- DOCUMENT ME!applicationName
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public void remove(State st)
StateStorage
remove
in interface StateStorage
remove
in class DefaultStateStorage
st
- DOCUMENT ME!public void store(java.io.OutputStream stream) throws java.io.IOException
StateStorage
java.io.IOException
- DOCUMENT ME!public void store(java.lang.String filePath, java.lang.String applicationName) throws java.io.IOException
DefaultStateStorage
store
in interface StateStorage
store
in class DefaultStateStorage
filePath
- DOCUMENT ME!applicationName
- DOCUMENT ME!
java.io.IOException
- DOCUMENT ME!public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |