Class DataSourceId

java.lang.Object
io.xpipe.core.source.DataSourceId

public class DataSourceId 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

  • Method Details

    • cleanString

      public static String cleanString(String input)
    • create

      public static DataSourceId create(String collectionName, String entryName)
      Creates a new data source id from a collection name and an entry name.
      Parameters:
      collectionName - the collection name, which may be null but not an empty string
      entryName - the entry name, which must be not null and not empty
      Throws:
      IllegalArgumentException - if any name is not valid
    • fromString

      public static DataSourceId 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