Interface RegistryStoreInterface
- All Known Implementing Classes:
BasexStore
public interface RegistryStoreInterface
-
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.voidopen()open the store.read the content of the given path from the store.default voidupdateEntries(String xml) creates/updates the given registry entry in the managed registry store.voidupdateEntries(String xml, String path) creates/updates the given registry entries in the registry store.
-
Method Details
-
open
void open()open the store. -
close
void close()close the store. -
create
create a new entry in the store. The- 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
save the content of a file into the store (replacing any existing document at the path).- Parameters:
file- the file to be stored.path- the path within the store, including the filename.
-
updateEntries
creates/updates the given registry entry in the managed registry store. The entry is given as an XML string, which should be a valid registry entry (i.e. it should conform to the RegistryInterface schema). The entry is stored in the standard managed location.- Parameters:
xml- the registry entry to be stored.
-
updateEntries
creates/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.- Parameters:
xml- the registry entry to be stored.path- the path to store the entry in the registry store.
-
deleteEntry
void deleteEntry(org.javastro.ivoa.entities.Ivoid id) delete the given entry from the store. TODO - should this just be physical delete of that id - or the logical one?- Parameters:
id-
-
deleteEntry
delete the resource with the given identifier from the document at the given path.- Parameters:
identifier- the IVOA identifier (ivo://...) of the resource.path- the path of the VOResources document within the store.
-
read
read the content of the given path from the store.- 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
checks if the given path exists in the store.- 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
Delete a whole path from the database.- Parameters:
path-
-