Class TagPathParser
- java.lang.Object
-
- com.inductiveautomation.ignition.common.sqltags.parser.TagPathParser
-
@Deprecated public class TagPathParser extends java.lang.Object
Deprecated.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PATH_SEPARATOR
Deprecated.static java.lang.String
PROPERTY_SEPARATOR
Deprecated.static java.lang.String
RELATIVE_DIR_UP
Deprecated.
-
Constructor Summary
Constructors Constructor Description TagPathParser()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.util.List<java.lang.String>
chopPath(java.lang.String string)
Deprecated.Chops the given string into the basic components of a tag path.static TagPath
derelativize(TagPath tagPath, TagPath relativeRoot)
Deprecated.De-relativizes a tag, given a full parent path.static boolean
isRelativePath(TagPath path)
Deprecated.Returns whether the given tag path is a relative path or not.static TagPath
parse(java.lang.String string)
Deprecated.Parses the given string into a TagPath.static TagPath
parse(java.lang.String defaultSource, java.lang.String string)
Deprecated.Parses the tag path, setting the source to the default if not present.static TagPath
parse(java.lang.String defaultSource, java.lang.String defaultSystem, java.lang.String string)
Deprecated.Parses the tag path, setting the source and system if not specified.static TagPath
parseSafe(java.lang.String string)
Deprecated.Calls parse, but catches exceptions and returns null for bad tag paths.static TagPath
parseSafe(java.lang.String defaultSource, java.lang.String string)
Deprecated.Calls parse, but catches exceptions and returns null for bad tag paths.static TagPath
relativize(TagPath newPath, TagPath relativeTo)
Deprecated.Returns a path based on newPath, but made relative to the second path.
-
-
-
Method Detail
-
isRelativePath
public static boolean isRelativePath(TagPath path)
Deprecated.Returns whether the given tag path is a relative path or not. Looks at whether the source is "." or "~".
-
chopPath
public static java.util.List<java.lang.String> chopPath(java.lang.String string) throws java.io.IOException
Deprecated.Chops the given string into the basic components of a tag path. Sources and properties are ignored, as are trailing separators indicating folder status. For example, this string:"[Source/System]Path/To/Tag.property"
would return the array:
["Path", "To", "Tag"]
- Throws:
java.io.IOException
-
parse
public static TagPath parse(java.lang.String string) throws java.io.IOException
Deprecated.Parses the given string into a TagPath. sources and property names are suppored, but not necessary. Paths look like:[Source]Path/To/Tag.property
- Throws:
java.io.IOException
-
parseSafe
public static TagPath parseSafe(java.lang.String string)
Deprecated.Calls parse, but catches exceptions and returns null for bad tag paths.
-
parseSafe
@Nullable public static TagPath parseSafe(java.lang.String defaultSource, java.lang.String string)
Deprecated.Calls parse, but catches exceptions and returns null for bad tag paths.
-
parse
public static TagPath parse(java.lang.String defaultSource, java.lang.String string) throws java.io.IOException
Deprecated.Parses the tag path, setting the source to the default if not present. This is basically used to fully qualify paths that may have been stored without a source.- Throws:
java.io.IOException
-
parse
public static TagPath parse(java.lang.String defaultSource, java.lang.String defaultSystem, java.lang.String string) throws java.io.IOException
Deprecated.Parses the tag path, setting the source and system if not specified.- Throws:
java.io.IOException
-
derelativize
public static TagPath derelativize(TagPath tagPath, TagPath relativeRoot) throws java.lang.RuntimeException
Deprecated.De-relativizes a tag, given a full parent path. This function works with relative sources, but also paths in the style of "../../Tag". The relative root is expected to be the path to the folder that would be containing the tag, not a peer tag.- Throws:
java.lang.RuntimeException
-
relativize
public static TagPath relativize(TagPath newPath, TagPath relativeTo)
Deprecated.Returns a path based on newPath, but made relative to the second path. If the common ancestor is the root, the tag path returned will have a root-relative source ("~"), otherwise the source will be ".". If the relativeTo path is null, the newPath is returned directly.It is expected that the relativeTo path is a folder.
-
-