Class Name

java.lang.Object
org.nuxeo.lib.stream.log.Name

public class Name extends Object
An identifier composed of a namespace and a specific name with 2 string representations:
- an uniform resource name (urn) represented as a relative path: namespace/name
- an identifier (id): encode the urn as namespace-name
When there is no namespace, URN and id are identical.
Since:
11.1
  • Field Details

    • NAMESPACE_GLOBAL

      public static final String NAMESPACE_GLOBAL
      See Also:
    • NAMESPACE_URN_SEP

      public static final String NAMESPACE_URN_SEP
      See Also:
    • NAMESPACE_ID_SEP

      public static final String NAMESPACE_ID_SEP
      See Also:
    • VALID_NAMESPACE_PATTERN

      protected static final Pattern VALID_NAMESPACE_PATTERN
    • VALID_LOG_NAME_PATTERN

      protected static final Pattern VALID_LOG_NAME_PATTERN
    • VALID_LOG_NAME_WITHOUT_NS_PATTERN

      protected static final Pattern VALID_LOG_NAME_WITHOUT_NS_PATTERN
    • namespace

      protected final String namespace
    • name

      protected final String name
    • id

      protected final String id
    • urn

      protected final String urn
  • Method Details

    • of

      public static Name of(String namespace, String name)
    • ofUrn

      public static Name ofUrn(String urn)
    • ofId

      public static Name ofId(String id)
    • idOfUrn

      public static String idOfUrn(String urn)
    • urnOfId

      public static String urnOfId(String id)
    • getNamespace

      public String getNamespace()
    • getName

      public String getName()
    • getId

      public String getId()
    • getUrn

      public String getUrn()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • checkLogName

      protected static void checkLogName(String name)
    • checkLogNameWithoutNamespace

      protected static void checkLogNameWithoutNamespace(String name)
    • checkNameSpace

      protected static void checkNameSpace(String name)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object