com.polarion.subterra.base.location.ILocation
FIELDS
Modifiers and Type | Name | Description |
---|---|---|
public, final, static, String | COMPONENT_DELIM | Location component delimiter (as {@link String} ). |
public, final, static, char | COMPONENT_DELIM_CHAR | Location component delimiter (as char ). |
METHODS
Modifiers and Type | Name | Description |
---|---|---|
public, boolean | containsRepositoryName() | Whether this location has repository name. |
public, boolean | isRelative() | Whether this location is relative (locations with repository names are always absolute). |
public, ILocation | getAbsoluteLocation(ILocation) | Compute absolute location from root location and this location and return new location. |
public, ILocation | getRelativeLocation(ILocation) | Relativize this location against given root (which may be relative) and return new location. |
public, boolean | hasRootLocation(ILocation) | Whether given location is root of this location. Positive answer allows {@link #getRelativeLocation(ILocation)} to succeed. |
public, int | getComponentCount() | |
public, String | getLastComponent() | Return last component of this location. Same as |
public, String | getLastComponentExtension() | Returns the extension of the last component of this location, i.e. the suffix of the last component starting with the last '.'. Returns an empty string if there is no '.' in the last component. Returns null if this location is empty (i.e. if {@link #getLastComponent()} returns null). |
public, String | getLastComponentWithoutExtension() | Returns the last component of this location without the extension, i.e. the prefix of the last component before the last '.'. Returns the entire last component if there is no '.' in it. Returns null if this location is empty (i.e. if {@link #getLastComponent()} returns null). |
public, String | getFirstComponent() | Returns the first coponent of this location. Same as |
public, String | getComponent(int) | Returns n-th component of the location. The n can range from 0 (first component) to getComponentCount()-1 (lastComponent). |
public, List | getComponents() | The resulting list is unmodifiable. |
public, int | findComponentSequence(List) | Searches this path components for the given sequence and if found, returns the position of the first component from the sequence in this location's {@link #getComponents()} . |
public, int | findComponentSequence(String) | Same as {@link #findComponentSequence(List)} but sequence defined as String (e.g. "/some/sequence") the leading and trailing slashes are ignored. |
public, boolean | containsComponentSequence(List) | Shortcut for findComponentSequence(sequence) != -1 |
public, boolean | containsComponentSequence(String) | Same as {@link #containsComponentSequence(List)} but sequence defined as String (e.f. "/some/sequence") the leading and trailing / have no meaning. |
public, boolean | containsComponent(String) | |
public, boolean | startsWithComponentSequence(List) | Shortcut for findComponentSequence(sequence) == 0 |
public, boolean | startsWithComponentSequence(String) | Same as {@link #startsWithComponentSequence(List)} but sequence defined as String (e.f. "/some/sequence") the leading and trailing / have no meaning. |
public, ILocation | removeFirstComponents(int) | Removes the first n components from the location path. |
public, ILocation | setComponent(int,String) | Creates new location, which is same as this one, but has newComponent on the nth place. |
public, ILocation | addOneComponentTowards(String) | Returns the location for which it holds: new_location.getParentLocation().equals(this) The extra segment is taken from the given path. Example: this: [REPO]/some/ path: /some/longer/path/to/go result: [REPO]/some/longer/ |
public, ILocation | append(String) | Append given location path to this location and return new location. |
public, ILocation | append(ILocation) | Append given location to this location and return new location. Revision of given location is ignored. |
public, String | getRepositoryName() | Return repository name (if any). |
ILocation | setRepositoryName(String) | Returns new location with specified repository name. |
public, ILocation | removeRepositoryName() | Remove repository name (if any) from this location and return new location. |
public, String | getLocationPath() | Return location path. |
public, ILocation | getParentLocation() | Return parent location (location without last component). |
public, String | getRevision() | Return revision (if any). |
public, ILocation | removeRevision() | Remove revision from this location and return new location. |
public, ILocation | setRevision(String) | Set revision of this location and return new location. |
public, ILocation | replaceLocationPath(String) | Replace current location path with given location path and return new location. |
public, boolean | hasRevision() | Whether this location has revision. |
public, String | serialize() | Converts the location into {@link String} . The exact format of the resulting string is not defined. Use {@link Location#deserializeLocation(String)} to convert the resulting string back to object. The resulting {@link String} should be human readable. |
Back to Index