Package org.projectnessie.model
Class Namespace
- java.lang.Object
-
- org.projectnessie.model.Content
-
- org.projectnessie.model.Namespace
-
@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 org.projectnessie.model.ImmutableNamespace.Builderbuilder()static NamespacefromPathString(java.lang.String encoded)Convert from path encoded string to normal string.intgetElementCount()abstract @NotNull @NotNull java.util.List<java.lang.String>getElements()java.lang.String[]getElementsArray()NamespacegetParent()abstract @NotNull @NotNull java.util.Map<java.lang.String,java.lang.String>getProperties()Content.TypegetType()Returns theContent.Typevalue for this content object.booleanisEmpty()booleanisSameOrSubElementOf(Namespace parent)@NotNull @NotNull java.lang.Stringname()static Namespaceof(java.lang.String... elements)Builds aNamespaceinstance for the given elements.static Namespaceof(java.util.List<java.lang.String> elements)Builds aNamespaceinstance for the given elements.static Namespaceof(java.util.List<java.lang.String> elements, java.util.Map<java.lang.String,java.lang.String> properties)Builds aNamespaceinstance for the given elements and the given properties.static Namespaceof(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String... elements)Builds aNamespaceinstance for the given elements and the given properties.static Namespaceof(ContentKey contentKey)Builds aNamespaceusing the elements of the given content key.static Namespaceparse(java.lang.String identifier)Builds aNamespaceinstance for the given elements split by the . (dot) character.ContentKeytoContentKey()java.lang.StringtoPathString()Convert this namespace to a URL encoded path string.java.lang.StringtoString()abstract NamespacewithId(java.lang.String id)
-
-
-
Field Detail
-
EMPTY
public static final Namespace EMPTY
-
-
Method Detail
-
builder
public static org.projectnessie.model.ImmutableNamespace.Builder builder()
-
getType
public Content.Type getType()
Description copied from class:ContentReturns theContent.Typevalue for this content object.The name of the returned value should match the JSON type name used for serializing the content object.
-
name
@NotNull @NotNull @Derived public @NotNull @NotNull java.lang.String name()
-
isEmpty
@Redacted public boolean isEmpty()
-
getElements
@NotNull @NotNull public abstract @NotNull @NotNull java.util.List<java.lang.String> getElements()
-
getElementsArray
@Redacted public java.lang.String[] getElementsArray()
-
getElementCount
@Redacted public int getElementCount()
-
getParent
@Redacted public Namespace getParent()
-
getProperties
@NotNull @NotNull public abstract @NotNull @NotNull java.util.Map<java.lang.String,java.lang.String> getProperties()
-
of
public static Namespace of(ContentKey contentKey)
Builds aNamespaceusing the elements of the given content key.- Parameters:
contentKey- key with the elements for the namespace- Returns:
- new namespace
-
of
public static Namespace of(java.lang.String... elements)
Builds aNamespaceinstance for the given elements.
-
of
public static Namespace of(java.util.Map<java.lang.String,java.lang.String> properties, java.lang.String... elements)
Builds aNamespaceinstance for the given elements and the given properties.
-
of
public static Namespace of(java.util.List<java.lang.String> elements)
Builds aNamespaceinstance for the given elements.
-
of
public static Namespace of(java.util.List<java.lang.String> elements, java.util.Map<java.lang.String,java.lang.String> properties)
Builds aNamespaceinstance for the given elements and the given properties.
-
parse
public static Namespace parse(java.lang.String identifier)
Builds aNamespaceinstance for the given elements split by the . (dot) character.
-
isSameOrSubElementOf
public boolean isSameOrSubElementOf(Namespace parent)
-
fromPathString
public static Namespace fromPathString(java.lang.String encoded)
Convert from path encoded string to normal string.- Parameters:
encoded- Path encoded string- Returns:
- Actual key.
-
toPathString
public java.lang.String toPathString()
Convert this namespace to a URL encoded path string.- Returns:
- String encoded for path use.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toContentKey
public ContentKey toContentKey()
-
-