Class BasexStore
java.lang.Object
org.javastro.ivoa.registry.internal.BasexStore
- All Implemented Interfaces:
RegistryStoreInterface
A registry store implemented with ... .
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.basex.core.Contextstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()close the store.voidcreate a new entry in the store.voidcreateFromFile(Path file, String path) save the content of a file into the store (replacing any existing document at the path).voidDelete a whole path from the database.voiddeleteEntry(String identifier, String path) delete the resource with the given identifier from the document at the given path.voiddeleteEntry(org.javastro.ivoa.entities.Ivoid id) delete the given entry from the store.booleanchecks if the given path exists in the store.org.basex.core.Contextvoidopen()open the store.read the content of the given path from the store.voidupdateEntries(String xml, String path) creates/updates the given registry entries in the registry store.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.javastro.ivoa.registry.internal.RegistryStoreInterface
updateEntries
-
Field Details
-
REGDB_NAME
- See Also:
-
context
protected static final org.basex.core.Context context
-
-
Constructor Details
-
BasexStore
public BasexStore()
-
-
Method Details
-
open
public void open()Description copied from interface:RegistryStoreInterfaceopen the store.- Specified by:
openin interfaceRegistryStoreInterface
-
close
public void close()Description copied from interface:RegistryStoreInterfaceclose the store.- Specified by:
closein interfaceRegistryStoreInterface
-
create
Description copied from interface:RegistryStoreInterfacecreate a new entry in the store. The- Specified by:
createin interfaceRegistryStoreInterface- Parameters:
content- the content to be stored.path- the path within the store to store the content. The path should be a valid path within the store, and should include the filename (e.g. "managed/base.xml").
-
createFromFile
Description copied from interface:RegistryStoreInterfacesave the content of a file into the store (replacing any existing document at the path).- Specified by:
createFromFilein interfaceRegistryStoreInterface- Parameters:
file- the file to be stored.path- the path within the store, including the filename.
-
updateEntries
Description copied from interface:RegistryStoreInterfacecreates/updates the given registry entries in the registry store. The input is given as an XML string, which should be a valid registry entry (i.e. it should conform to the RegistryInterface schema). The path parameter is used to specify the location of the entry in the registry store. The location needs to have a VOResources root element already in place.- Specified by:
updateEntriesin interfaceRegistryStoreInterface- Parameters:
xml- the registry entry to be stored.path- the path to store the entry in the registry store.
-
deleteEntry
public void deleteEntry(org.javastro.ivoa.entities.Ivoid id) Description copied from interface:RegistryStoreInterfacedelete the given entry from the store. TODO - should this just be physical delete of that id - or the logical one?- Specified by:
deleteEntryin interfaceRegistryStoreInterface
-
deleteEntry
Description copied from interface:RegistryStoreInterfacedelete the resource with the given identifier from the document at the given path.- Specified by:
deleteEntryin interfaceRegistryStoreInterface- Parameters:
identifier- the IVOA identifier (ivo://...) of the resource.path- the path of the VOResources document within the store.
-
read
Description copied from interface:RegistryStoreInterfaceread the content of the given path from the store.- Specified by:
readin interfaceRegistryStoreInterface- Parameters:
path- the path to read from the store. The path should be a valid path within the store, and should include the filename (e.g. "managed/base.xml").- Returns:
- the content of the given path.
- Throws:
org.basex.core.BaseXException- if there is an error reading from the store.
-
exists
Description copied from interface:RegistryStoreInterfacechecks if the given path exists in the store.- Specified by:
existsin interfaceRegistryStoreInterface- Parameters:
path- the path to chack for existence. The path should be a valid path within the store, and should include the filename (e.g. "managed/base.xml").- Returns:
- true if the path already exists.
-
delete
Description copied from interface:RegistryStoreInterfaceDelete a whole path from the database.- Specified by:
deletein interfaceRegistryStoreInterface
-
getContext
public org.basex.core.Context getContext()- Returns:
- The Store context
-