Class TagPathUtils
- java.lang.Object
-
- com.inductiveautomation.ignition.common.TagPathUtils
-
public class TagPathUtils extends java.lang.Object
Created by colby.clegg on 7/14/2015.
-
-
Constructor Summary
Constructors Constructor Description TagPathUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static TagPath
downgrade(TagPath path)
Deprecated.static java.util.List<TagPath>
downgrade(java.util.List<TagPath> paths)
Deprecated.static ArrayIndex
getArrayIndex(TagPath path)
Returns the array index contained in the tag, or null if it's not an array path.static TagPath
getArrayPath(TagPath tagPath, ArrayIndex arrayIndex)
Given a path and an ArrayIndex, returns a version that contains the array's row index appended to the end.static TagPath
getNonArrayPath(TagPath path)
Deprecated.use getNonSubIndexPath going forward.static TagPath
getNonSubIndexPath(TagPath path)
static java.util.Optional<SubIndex>
getSubIndex(TagPath path)
static TagPath
getSubIndexPath(TagPath tagPath, SubIndex subIndex)
protected static java.lang.String
getSubIndexString(TagPath path)
static boolean
isArrayPath(TagPath path)
Returns whether the tag path is sub indexed into an array.
Important: The broader concept of "SubIndex" was introduced in 8.1.static boolean
isSubIndexPath(TagPath path)
static boolean
isValueOrNullProp(TagPath path)
static boolean
isWildcardPath(TagPath path)
static java.lang.String
sanitizeName(java.lang.String tagName)
This function removes any characters from a tag name that might cause problems as part of a full path.static TagPath
upgrade(TagPath path)
static java.util.List<TagPath>
upgrade(java.util.List<TagPath> paths)
static java.util.Set<TagPath>
upgrade(java.util.Set<TagPath> paths)
static java.util.List<TagPath>
upgradeToList(java.util.Collection<TagPath> paths)
static Property<?>
valuePropIfNull(TagPath path)
-
-
-
Method Detail
-
downgrade
@Deprecated public static java.util.List<TagPath> downgrade(java.util.List<TagPath> paths)
Deprecated.
-
upgradeToList
public static java.util.List<TagPath> upgradeToList(java.util.Collection<TagPath> paths)
-
getNonArrayPath
@Deprecated public static TagPath getNonArrayPath(TagPath path)
Deprecated.use getNonSubIndexPath going forward.Given a path, returns a version that does not include array subset information. Works fine if the source path is not an array path to begin with.
-
getArrayPath
public static TagPath getArrayPath(TagPath tagPath, ArrayIndex arrayIndex)
Given a path and an ArrayIndex, returns a version that contains the array's row index appended to the end. Returns an unchanged path if the path already contains an array index, or the array's row index is not set.
-
isArrayPath
public static boolean isArrayPath(TagPath path)
Returns whether the tag path is sub indexed into an array.
Important: The broader concept of "SubIndex" was introduced in 8.1. In most cases, those functions should be used (isSubIndexPath, getSubIndex), as they will be more flexible. Some areas of the code specifically want to only deal with ArrayIndex, so these still exist, and have been updated to ONLY support array indexes.
-
getSubIndexString
protected static java.lang.String getSubIndexString(TagPath path)
-
isSubIndexPath
public static boolean isSubIndexPath(TagPath path)
-
getArrayIndex
public static ArrayIndex getArrayIndex(TagPath path)
Returns the array index contained in the tag, or null if it's not an array path.
-
getSubIndex
public static java.util.Optional<SubIndex> getSubIndex(TagPath path) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
isWildcardPath
public static boolean isWildcardPath(TagPath path)
-
sanitizeName
public static java.lang.String sanitizeName(java.lang.String tagName)
This function removes any characters from a tag name that might cause problems as part of a full path.
-
isValueOrNullProp
public static boolean isValueOrNullProp(TagPath path)
-
-