Package com._1c.g5.v8.dt.form.util
Class DatapathUtil
java.lang.Object
com._1c.g5.v8.dt.form.util.DatapathUtil
The utility class for a data path object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AbstractDataPath
ReturnsTableHolder
's parent path for auto-table which has no data path itself (e.g.static AbstractDataPath
getDataPathForCurrentScriptVariant
(AbstractDataPath sourceDataPath, Form form, ScriptVariant scriptVariant, IDataSourceInfoAssociationService associationService) static Integer[]
Gets indexes data for segmentsstatic boolean
hasIndex
(AbstractDataPath path) The method checks aAbstractDataPath
contains indexes datastatic boolean
Checks the data path is a data path of form elementstatic boolean
isEqualDataPath
(AbstractDataPath path1, AbstractDataPath path2) Compares twoAbstractDataPath
object each other.static boolean
Compares twoAbstractFormDataSource#getDataPath(ScriptVariant)
object each other.static void
setIndexForSegment
(AbstractDataPath path, Integer[] indexes) Sets indexes data for segments of the data pathstatic boolean
startsWith
(AbstractDataPath verifiable, AbstractDataPath prefix) Tests if the verifiable data path starts with the specified prefix data path.
-
Constructor Details
-
DatapathUtil
public DatapathUtil()
-
-
Method Details
-
isEqualDataPath
Compares twoAbstractDataPath
object each other. The result istrue
if and only if they represents the same sequence of segments.- Parameters:
path1
- - a first pathpath2
- - a second path- Returns:
true
if the given paths represents the same sequence of segments,false
otherwise.- Throws:
NullPointerException
- in case one from the specified paths isnull
-
isEqualDataPath
public static boolean isEqualDataPath(AbstractFormDataSourceInfo info1, AbstractFormDataSourceInfo info2) Compares twoAbstractFormDataSource#getDataPath(ScriptVariant)
object each other.- Parameters:
info1
- the first property infoinfo2
- the second property info- Returns:
true
if the given paths represents the same sequence of segments,false
otherwise.- Throws:
NullPointerException
- in case one from the specified paths isnull
-
startsWith
Tests if the verifiable data path starts with the specified prefix data path.- Parameters:
verifiable
- the verifiableprefix
- the prefix- Returns:
true
if the verifiable data path starts with a prefix data path;false
otherwise.
-
isElementDataPath
Checks the data path is a data path of form element- Parameters:
path
- the data path- Returns:
- return
true
if is data path of form element.
-
hasIndex
The method checks aAbstractDataPath
contains indexes data- Parameters:
path
- the checking path- Returns:
true
if path contains any indexes data;false
the otherways
-
getIndexForSegment
Gets indexes data for segments- Parameters:
path
- the path for gets indexes data- Returns:
- returns the array with values of indexes for the corresponding segments.
Length of returning array equals size of path segments.
If segments not contains index then array value equals
null
-
setIndexForSegment
Sets indexes data for segments of the data pathImportant: the indexes will be set to current data path, do not forget using the copy data path. </p
- Parameters:
path
- the data path to which it will be set indexes.indexes
- the setting indexes- See Also:
-
EcoreUtil.copy(org.eclipse.emf.ecore.EObject)
-
getDataPathForCurrentScriptVariant
public static AbstractDataPath getDataPathForCurrentScriptVariant(AbstractDataPath sourceDataPath, Form form, ScriptVariant scriptVariant, IDataSourceInfoAssociationService associationService) -
getDataPathForAutoTable
ReturnsTableHolder
's parent path for auto-table which has no data path itself (e.g. GanttChart's embedded table in 8.3.21+)- Parameters:
item
- the auto-table candidate, cannot benull
- Returns:
- path of the parent of
TableHolder
, can benull
-