Class DataStoreId

java.lang.Object
io.xpipe.core.store.DataStoreId

public class DataStoreId extends Object
Represents a reference to an XPipe data source. This reference consists out of a collection name and an entry name to allow for better organisation.

To allow for a simple usage of data source ids, the collection and entry names are trimmed and converted to lower case names when creating them. The two names are separated by a colon and are therefore not allowed to contain colons themselves.

A missing collection name indicates that the data source exists only temporarily.

See Also:
  • Field Details

  • Constructor Details

    • DataStoreId

      public DataStoreId(List<String> names)
  • Method Details

    • create

      public static DataStoreId create(String... names)
      Creates a new data source id from a collection name and an entry name.
      Throws:
      IllegalArgumentException - if any name is not valid
    • fromString

      public static DataStoreId fromString(String s)
      Creates a new data source id from a string representation. The string must contain exactly one colon and non-empty names.
      Parameters:
      s - the string representation, must be not null and fulfill certain requirements
      Throws:
      IllegalArgumentException - if the string is not valid
    • toString

      public String toString()
      Overrides:
      toString in class Object