|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.stores.AbstractXMLStore
public abstract class AbstractXMLStore
A convenience class for implementing XMLStores. The implementation
of the load(org.planx.xmlstore.Reference) method resolves any RelativeReferences before calling
resolvedLoad(org.planx.xmlstore.Reference). This method calls the underlying XMLStore if
one was provided in the constructor.
Thus, implementations that only accept certain types of References
should override the resolvedLoad(org.planx.xmlstore.Reference) method instead of the load(org.planx.xmlstore.Reference) method.
Implementations that accept any kind of Reference can just
override the load(org.planx.xmlstore.Reference) method.
| Field Summary | |
|---|---|
protected XMLStore |
xmlstore
|
| Constructor Summary | |
|---|---|
protected |
AbstractXMLStore()
Base XMLStores that do not wrap other XMLStores
can use this constructor. |
protected |
AbstractXMLStore(XMLStore xmlstore)
Decorators that wrap other XMLStores can use this
constructor. |
| Method Summary | |
|---|---|
protected void |
checkClosed()
|
void |
close()
The method is used to let the XMLStore properly commit all
data to the underlying ressource, release resources, and so
forth. |
Node |
load(Reference vref)
Resolves any RelativeReferences and calls resolvedLoad(org.planx.xmlstore.Reference). |
protected Node |
resolvedLoad(Reference resolvedRef)
Called by load(org.planx.xmlstore.Reference) after resolving RelativeReferences. |
Reference |
save(Node node)
Saves the XML data represented by the specified Node. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected XMLStore xmlstore
| Constructor Detail |
|---|
protected AbstractXMLStore()
XMLStores that do not wrap other XMLStores
can use this constructor.
protected AbstractXMLStore(XMLStore xmlstore)
XMLStores can use this
constructor.
| Method Detail |
|---|
public void close()
throws IOException
XMLStoreXMLStore properly commit all
data to the underlying ressource, release resources, and so
forth. Once close has been issued on an XMLStore, the store
is no longer available for handling requests. Any subsequent
request to the store will result in an exception being
thrown. An XMLStore implementation has to ensure that
this happens.
close in interface XMLStoreIOException - if it is not possible to properly close the storeprotected void checkClosed()
public Reference save(Node node)
throws IOException
XMLStoreNode.
The method returns a unique location independent
reference, which can be used to load the node, when needed.
save in interface XMLStorenode - representing XML data in the form of semi-structured tree data
IOException - if an error occurs during disk, network, etc access
public Node load(Reference vref)
throws IOException,
UnknownReferenceException
RelativeReferences and calls resolvedLoad(org.planx.xmlstore.Reference).
load in interface XMLStorevref - the Reference to the data
IOException - if an error occurs during disk, network, etc access
UnknownReferenceException - if the data referenced is not stored
in the XMLStore or the Reference is of
a type not supported by the XMLStore
protected Node resolvedLoad(Reference resolvedRef)
throws IOException,
UnknownReferenceException
load(org.planx.xmlstore.Reference) after resolving RelativeReferences.
resolvedRef - the resolved Reference
IOException
UnknownReferenceExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||