Class BasicTagPath
java.lang.Object
com.inductiveautomation.ignition.common.tags.paths.AbstractTagPath
com.inductiveautomation.ignition.common.tags.paths.BasicTagPath
- All Implemented Interfaces:
Path
,TagPath
,Serializable
,Comparable<TagPath>
- See Also:
-
Field Summary
FieldsFields inherited from interface com.inductiveautomation.ignition.common.Path
SERIALIZATION_WHITELIST
-
Constructor Summary
ConstructorsConstructorDescriptionBasicTagPath
(String source) BasicTagPath
(String source, List<String> pathParts) Creates a tag path to a folder.BasicTagPath
(String source, List<String> pathParts, Property<?> prop) Creates a tag path to a tag's property -
Method Summary
Modifier and TypeMethodDescriptionstatic TagPath
Takes a folder path, and appends the second tag path on to it.static TagPath
Extends the tag path by the given name.static BasicTagPath
protected static TagPath
getChildPath
(String nextId) Returns a path below the current path.Returns the name of the item at the end of the path that this path points to.Convenience function to return the last path element.Returns the path to the parent folder.getPathComponent
(int i) Returns the path element at the specified location.int
Returns the number of elements in the path, which can be retrieved through getPathComponent().Property<?>
Returns the type of property in the tag that this path is referencing.Returns the source for this tag path.static BasicTagPath
renameParentFolder
(TagPath path, TagPath newParent) Creates a path equal to the original, but with the new name specified by newParent.protected void
protected void
setPathParts
(List<String> parts) static BasicTagPath
Returns a sub portion of the path.static BasicTagPath
Returns a sub portion of the child path that extends beyond the parent path.Methods inherited from class com.inductiveautomation.ignition.common.tags.paths.AbstractTagPath
_createPath, compareNullLow, compareTo, equals, hashCode, isAncestorOf, toString, toStringFull, toStringPartial
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.common.tags.model.TagPath
getChildPath
-
Field Details
-
EMPTY_LIST
-
pathParts
-
source
-
prop
-
parent
-
-
Constructor Details
-
BasicTagPath
Creates a tag path to a tag's property -
BasicTagPath
Creates a tag path to a folder. System will be null. -
BasicTagPath
-
-
Method Details
-
renameParentFolder
Creates a path equal to the original, but with the new name specified by newParent. The parent cannot change length, it can only be renamed. -
append
Takes a folder path, and appends the second tag path on to it. The returned tag will have the source and system of the root path, unless the root path source/system are null (not just empty string). -
append
Extends the tag path by the given name. Similar to getChildPath, however this static version will accept a null value for parent, and will generate a new path with just the name if necessary. -
copy
-
subPath
Returns a sub portion of the path. If the specified length covers the last component, the source path's property will be included in the resulting path as well. Does NOT include the source, because this is now intended to be a relative path to the original one. -
subPath
Returns a sub portion of the child path that extends beyond the parent path. Source will be empty, and the property will only be included if set on the child. -
setPathParts
-
getItemName
Description copied from interface:TagPath
Returns the name of the item at the end of the path that this path points to. This will be a tag name or a folder name.- Specified by:
getItemName
in interfaceTagPath
-
getLastPathComponent
Description copied from interface:Path
Convenience function to return the last path element.- Specified by:
getLastPathComponent
in interfacePath
-
getParentPath
Returns the path to the parent folder.- Specified by:
getParentPath
in interfacePath
- Specified by:
getParentPath
in interfaceTagPath
-
setParent
-
getProperty
Description copied from interface:TagPath
Returns the type of property in the tag that this path is referencing.- Specified by:
getProperty
in interfaceTagPath
-
getSource
Description copied from interface:TagPath
Returns the source for this tag path. Some tag paths don't have a source, indicating that they may be a relative, or they may wish to use a default source. -
getPathComponent
Description copied from interface:Path
Returns the path element at the specified location.- Specified by:
getPathComponent
in interfacePath
-
getPathLength
public int getPathLength()Description copied from interface:Path
Returns the number of elements in the path, which can be retrieved through getPathComponent().- Specified by:
getPathLength
in interfacePath
-
getChildPath
Description copied from interface:TagPath
Returns a path below the current path.- Specified by:
getChildPath
in interfaceTagPath
-
createDerivedTagPath
-