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 NamespacefromPathString(java.lang.String encoded)Convert from path encoded string to normal string.abstract @NotNull java.util.List<java.lang.String>getElements()abstract @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 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 Namespaceparse(java.lang.String identifier)Builds aNamespaceinstance for the given elements split by the . (dot) character.java.lang.StringtoPathString()Convert this namespace to a URL encoded path string.java.lang.StringtoString()
-
-
-
Field Detail
-
EMPTY
public static final Namespace EMPTY
-
-
Method Detail
-
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 @Derived public @NotNull java.lang.String name()
-
isEmpty
@Redacted public boolean isEmpty()
-
getElements
@NotNull public abstract @NotNull java.util.List<java.lang.String> getElements()
-
getProperties
@NotNull public abstract @NotNull java.util.Map<java.lang.String,java.lang.String> getProperties()
-
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
-
-