Class RepositoryPath
java.lang.Object
org.eclipse.dirigible.repository.api.RepositoryPath
public class RepositoryPath extends Object
Utility class representing the path object in the Repository.
-
Constructor Summary
Constructors Constructor Description RepositoryPath(String path)Instantiates a new repository path.RepositoryPath(String... input)Instantiates a new repository path.RepositoryPath(RepositoryPath repositoryPath)Instantiates a new repository path. -
Method Summary
Modifier and Type Method Description RepositoryPathappend(String name)Add new segment after the last position.Stringbuild()Builds the.StringconstructPathFrom(int number)Construct path from.StringconstructPathTo(int number)Construct path to.booleanequals(Object obj)Equals.StringgetLastSegment()Getter for the last segment.RepositoryPathgetParentPath()Getter for the path of the parent.StringgetPath()Gets the path.String[]getSegments()Gets the segments.inthashCode()Hash code.static StringnormalizeName(String name)Normalize name.static StringnormalizePath(String path, String name)Normalize path.voidsetSegment(int index, String value)Set the segment of the given index position to the given value, starting with zero.StringtoString()To string.
-
Constructor Details
-
RepositoryPath
Instantiates a new repository path.- Parameters:
path- the path
-
RepositoryPath
Instantiates a new repository path.- Parameters:
repositoryPath- the repository path
-
RepositoryPath
Instantiates a new repository path.- Parameters:
input- the input
-
-
Method Details
-
getLastSegment
Getter for the last segment.- Returns:
- the last segment
-
getParentPath
Getter for the path of the parent.- Returns:
- the parent path
-
append
Add new segment after the last position.- Parameters:
name- the name- Returns:
- the repository path
-
toString
To string. -
build
Builds the.- Returns:
- the string
-
getPath
Gets the path.- Returns:
- the path
-
equals
Equals. -
hashCode
public int hashCode()Hash code. -
getSegments
Gets the segments.- Returns:
- the segments
-
constructPathTo
Construct path to.- Parameters:
number- the number- Returns:
- the string
-
constructPathFrom
Construct path from.- Parameters:
number- the number- Returns:
- the string
-
normalizePath
Normalize path.- Parameters:
path- the pathname- the name- Returns:
- the string
-
normalizeName
Normalize name.- Parameters:
name- the name- Returns:
- the string
-
setSegment
Set the segment of the given index position to the given value, starting with zero.- Parameters:
index- the indexvalue- the value
-