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 Stringidprotected Stringnameprotected Stringnamespacestatic StringNAMESPACE_GLOBALstatic StringNAMESPACE_ID_SEPstatic StringNAMESPACE_URN_SEPprotected Stringurnprotected static PatternVALID_LOG_NAME_PATTERNprotected static PatternVALID_LOG_NAME_WITHOUT_NS_PATTERNprotected static PatternVALID_NAMESPACE_PATTERN
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static voidcheckLogName(String name)protected static voidcheckLogNameWithoutNamespace(String name)protected static voidcheckNameSpace(String name)booleanequals(Object o)StringgetId()StringgetName()StringgetNamespace()StringgetUrn()inthashCode()static StringidOfUrn(String urn)static Nameof(String namespace, String name)static NameofId(String id)static NameofUrn(String urn)StringtoString()static StringurnOfId(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)
-
-