Interface RegistryStoreInterface

All Known Implementing Classes:
BasexStore

public interface RegistryStoreInterface
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    close the store.
    void
    create(String content, String path)
    create a new entry in the store.
    void
    createFromFile(Path file, String path)
    save the content of a file into the store (replacing any existing document at the path).
    void
    delete(String path)
    Delete a whole path from the database.
    void
    deleteEntry(String identifier, String path)
    delete the resource with the given identifier from the document at the given path.
    void
    deleteEntry(org.javastro.ivoa.entities.Ivoid id)
    delete the given entry from the store.
    boolean
    exists(String path)
    checks if the given path exists in the store.
    void
    open the store.
    read(String path)
    read the content of the given path from the store.
    default void
    creates/updates the given registry entry in the managed registry store.
    void
    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

      void create(String content, String path)
      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

      void createFromFile(Path file, String path)
      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

      default void updateEntries(String xml)
      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

      void updateEntries(String xml, String path)
      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

      void deleteEntry(String identifier, String path)
      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

      String read(String path) throws org.basex.core.BaseXException
      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

      boolean exists(String path)
      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

      void delete(String path)
      Delete a whole path from the database.
      Parameters:
      path -