|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.xmlstore.stores.TranslatorXMLStore
public class TranslatorXMLStore
A bridge between location independent and location dependent XMLStores.
The TranslatorXMLStore translates the underlying XMLStores
References to ValueReferences that are location
independent. Only root nodes (i.e. ones that were at any point argument to the
save method) are registered in the translation mapping.
The store implements the ExecXMLStore interface,
but it will throw UnsupportedOperationException if
exec is invoked and the underlying XML Store does not
implement the ExecXMLStore interface.
| Constructor Summary | |
|---|---|
TranslatorXMLStore(LocalXMLStore xmlstore)
|
|
| Method Summary | |
|---|---|
void |
close()
The method is used to let the XMLStore properly commit all
data to the underlying ressource, release resources, and so
forth. |
ValueReference |
exec(ValueReference code,
ValueReference args)
Execute the code referenced by codeRef supplied
with the argument reference by argsRef. |
NameServer<ValueReference> |
getNameServer()
Returns a name server associated with this XML Store. |
Node |
load(ValueReference ref)
Loads XML data identified by a reference. |
void |
release(ValueReference ref)
|
void |
retain(ValueReference ref)
|
ValueReference |
save(Node n)
Saves the Node, gives it a ValueReference,
and registers it in the local reference server. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TranslatorXMLStore(LocalXMLStore xmlstore)
throws IOException
IOException| Method Detail |
|---|
public Node load(ValueReference ref)
throws IOException
XMLStoreNodes.
load in interface XMLStore<ValueReference>ref - 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
public ValueReference exec(ValueReference code,
ValueReference args)
throws IOException,
ExecException,
UnsupportedOperationException
ExecXMLStorecodeRef supplied
with the argument reference by argsRef. Returns
a reference to the result of the execution.
exec in interface ExecXMLStore<ValueReference>code - the Reference to a
binary node containing class code implementing StoredCodeargs - reference to arguments
IOException - if an error occurs during loading of code or arguments
ExecException
UnsupportedOperationException
public ValueReference save(Node n)
throws IOException
Node, gives it a ValueReference,
and registers it in the local reference server.
save in interface XMLStore<ValueReference>n - representing XML data in the form of semi-structured tree data
IOException - if an error occurs during disk, network, etc access
public void retain(ValueReference ref)
throws UnknownReferenceException
UnknownReferenceException
public void release(ValueReference ref)
throws UnknownReferenceException
UnknownReferenceExceptionpublic NameServer<ValueReference> getNameServer()
getNameServer in interface XMLStore<ValueReference>
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 XMLStore<ValueReference>IOException - if it is not possible to properly close the storepublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||