Package org.nuxeo.lib.stream.log
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 asnamespace-name
When there is no namespace, URN and id are identical.- Since:
- 11.1
-
-
Field Summary
Fields Modifier and Type Field Description protected String
id
protected String
name
protected String
namespace
static String
NAMESPACE_GLOBAL
static String
NAMESPACE_ID_SEP
static String
NAMESPACE_URN_SEP
protected String
urn
protected static Pattern
VALID_LOG_NAME_PATTERN
protected static Pattern
VALID_LOG_NAME_WITHOUT_NS_PATTERN
protected static Pattern
VALID_NAMESPACE_PATTERN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static void
checkLogName(String name)
protected static void
checkLogNameWithoutNamespace(String name)
protected static void
checkNameSpace(String name)
boolean
equals(Object o)
String
getId()
String
getName()
String
getNamespace()
String
getUrn()
int
hashCode()
static String
idOfUrn(String urn)
static Name
of(String namespace, String name)
static Name
ofId(String id)
static Name
ofUrn(String urn)
String
toString()
static String
urnOfId(String id)
-
-
-
Field Detail
-
NAMESPACE_GLOBAL
public static final String NAMESPACE_GLOBAL
- See Also:
- Constant Field Values
-
NAMESPACE_URN_SEP
public static final String NAMESPACE_URN_SEP
- See Also:
- Constant Field Values
-
NAMESPACE_ID_SEP
public static final String NAMESPACE_ID_SEP
- See Also:
- Constant Field Values
-
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 Detail
-
getNamespace
public String getNamespace()
-
getName
public String getName()
-
getId
public String getId()
-
getUrn
public String getUrn()
-
checkLogName
protected static void checkLogName(String name)
-
checkLogNameWithoutNamespace
protected static void checkLogNameWithoutNamespace(String name)
-
checkNameSpace
protected static void checkNameSpace(String name)
-
-