Class QualifiedPath
java.lang.Object
com.inductiveautomation.ignition.common.QualifiedPath
- All Implemented Interfaces:
- Path,- Serializable
This class is a path to anything in Ignition, across any system. It dictates
 how the path is formed, but the actual meaning of different subcomponents
 will depend on the context in which the path is used.
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classA builder to assist in constructingQualifiedPaths.static classstatic class
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from interface com.inductiveautomation.ignition.common.PathSERIALIZATION_WHITELIST
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()booleanReturns a path with the provided component added on at the end.Convenience function to return the last path element.Returns a path representing the element above the current path.getPart(int i) protected QualifiedPath.Part[]getPartsFor(String id) Returns all of the sub parts for a specified id, or null if they don't exist.getPathComponent(int i) Returns the path element at the specified location.getPathComponentOrElse(String id, String orElse) intReturns the number of elements in the path, which can be retrieved through getPathComponent().inthashCode()booleanprotected intLocates the component specified and inserts the new component before it.booleanisAncestorOf(Path child) Returns whether the provided path is a child path of this one.static QualifiedPathCreates a path out of the specified id/value pairs.static QualifiedPathAttempts to parse the string into an QualifiedPath.static QualifiedPathSame as parse(), but catches exceptions and returns null on bad paths.protected static List<QualifiedPath.Part>parseSubParts(String id, String value) Returns at least one part for the root, with id.Returns a new path with the provided component added at the beginning.Removes the given component, if present.If the component specified by the given id exists in the path, the value will be replaced with the new value.strip()Removes the last fully-qualified component from the path.subpath()Removes the first path component and returns the rest as a new path.Returns the paths that comes after the first instance of the specified id.toString()Returns the path in a friendlier to read form, without component ids.
- 
Field Details- 
SUBPART_SEPERATOR- See Also:
 
- 
PART_SEPERATOR- See Also:
 
- 
COMPONENTID_SEPERATOR- See Also:
 
 
- 
- 
Constructor Details- 
QualifiedPathpublic QualifiedPath()
 
- 
- 
Method Details- 
clone
- 
ofCreates a path out of the specified id/value pairs. The parameters must be in the form "id,value,id,value".
- 
extendReturns a path with the provided component added on at the end.
- 
prependReturns a new path with the provided component added at the beginning.
- 
insertLocates the component specified and inserts the new component before it.
- 
getPathLengthpublic int getPathLength()Description copied from interface:PathReturns the number of elements in the path, which can be retrieved through getPathComponent().- Specified by:
- getPathLengthin interface- Path
 
- 
getPart
- 
getPathComponentDescription copied from interface:PathReturns the path element at the specified location.- Specified by:
- getPathComponentin interface- Path
 
- 
getLastPathComponentDescription copied from interface:PathConvenience function to return the last path element.- Specified by:
- getLastPathComponentin interface- Path
 
- 
getLastPathComponentId
- 
getFirstPathComponent
- 
getFirstPathComponentId
- 
subpathRemoves the first path component and returns the rest as a new path.
- 
subpathReturns the paths that comes after the first instance of the specified id.- Parameters:
- id- component id after which the subsequent path parts will be returned.
- Returns:
- everything after the specified id, or null if id is not found.
 
- 
stripRemoves the last fully-qualified component from the path. This differs from getParentPath() in that that function doesn't care whether the component is qualified or not.
- 
removeRemoves the given component, if present.
- 
replaceIf the component specified by the given id exists in the path, the value will be replaced with the new value.
- 
indexOf
- 
getPathComponent
- 
getPathComponentOrElse
- 
getPartsForReturns all of the sub parts for a specified id, or null if they don't exist.
- 
hasPathComponent
- 
getParentPathDescription copied from interface:PathReturns a path representing the element above the current path.- Specified by:
- getParentPathin interface- Path
 
- 
toString
- 
toStringSimpleReturns the path in a friendlier to read form, without component ids.
- 
isAncestorOfDescription copied from interface:PathReturns whether the provided path is a child path of this one.- Specified by:
- isAncestorOfin interface- Path
 
- 
hashCodepublic int hashCode()
- 
equals
- 
parseAttempts to parse the string into an QualifiedPath. IOException is thrown on invalid path.- Throws:
- IOException
 
- 
parseSafeSame as parse(), but catches exceptions and returns null on bad paths.
- 
parseSubPartsReturns at least one part for the root, with id. If the value contains sub parts, those will be returned as well. The root part will have the sub part count set on it already.
 
-