Package org.projectnessie.model
Class Namespace
- java.lang.Object
-
- org.projectnessie.model.Content
-
- org.projectnessie.model.Namespace
-
- Direct Known Subclasses:
ImmutableNamespace
@Immutable public abstract class Namespace extends Content
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.projectnessie.model.Content
Content.Type
-
-
Constructor Summary
Constructors Constructor Description Namespace()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static NamespacefromPathString(String encoded)Convert from path encoded string to normal string.abstract @NotNull List<String>getElements()@NotNull StringgetId()Unique id for this object.Content.TypegetType()Returns theContent.Typeenum constant for this content object.booleanisEmpty()@NotNull Stringname()static Namespaceof(String... elements)Builds aNamespaceinstance for the given elements.static Namespaceof(List<String> elements)Builds aNamespaceinstance for the given elements.static Namespaceparse(String identifier)Builds aNamespaceinstance for the given elements split by the . (dot) character.StringtoPathString()Convert this namespace to a URL encoded path string.StringtoString()
-
-
-
Field Detail
-
EMPTY
public static final Namespace EMPTY
-
-
Method Detail
-
getType
public Content.Type getType()
Description copied from class:ContentReturns theContent.Typeenum constant for this content object.The name of the returned enum value should match the JSON type name used for serializing the content object.
-
name
@NotNull @Derived public @NotNull String name()
-
getId
@NotNull @Derived public @NotNull String getId()
Description copied from class:ContentUnique id for this object.This id is unique for the entire lifetime of this Content object and persists across renames. Two content objects with the same key will have different id.
-
isEmpty
@Redacted public boolean isEmpty()
-
of
public static Namespace of(String... elements)
Builds aNamespaceinstance for the given elements.
-
of
public static Namespace of(List<String> elements)
Builds aNamespaceinstance for the given elements.
-
parse
public static Namespace parse(String identifier)
Builds aNamespaceinstance for the given elements split by the . (dot) character.
-
fromPathString
public static Namespace fromPathString(String encoded)
Convert from path encoded string to normal string.- Parameters:
encoded- Path encoded string- Returns:
- Actual key.
-
toPathString
public String toPathString()
Convert this namespace to a URL encoded path string.- Returns:
- String encoded for path use.
-
-