Class ChildMdObjectMatcher
- java.lang.Object
-
- com._1c.g5.v8.dt.md.compare.matching.AbstractMdObjectMatcher<MdObject>
-
- com._1c.g5.v8.dt.md.compare.matching.ChildMdObjectMatcher
-
public class ChildMdObjectMatcher extends AbstractMdObjectMatcher<MdObject>
A matcher of child (contained) MD objects. Also registers them in the specified resources.
-
-
Constructor Summary
Constructors Constructor Description ChildMdObjectMatcher(IComparisonSession session, ChildMdCollectionComparisonNode parentCollectionNode, List<MdObject> mainObjects, List<MdObject> otherObjects, List<MdObject> ancestorObjects, com._1c.g5.v8.dt.internal.md.compare.MdObjectResource mainResource, com._1c.g5.v8.dt.internal.md.compare.MdObjectResource otherResource, com._1c.g5.v8.dt.internal.md.compare.MdObjectResource ancestorResource, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider, com._1c.g5.v8.dt.internal.md.compare.MdComparisonNodeFactory nodeFactory)
Constructs a matcher.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MdObjectComparisonNode
createNode(MdObject main, MdObject other, MdObject ancestor)
Creates a comparison node for the triple of matched objects.protected String
getName(MdObject object)
Returns the name of the matched object.protected String
getSymlink(MdObject object)
Returns the symbolic link of the matched object.protected UUID
getUuid(MdObject object)
Returns the UUID of the matched object.-
Methods inherited from class com._1c.g5.v8.dt.md.compare.matching.AbstractMdObjectMatcher
checkOrderChange, getParentCollectionFeature, getSession, match
-
-
-
-
Constructor Detail
-
ChildMdObjectMatcher
public ChildMdObjectMatcher(IComparisonSession session, ChildMdCollectionComparisonNode parentCollectionNode, List<MdObject> mainObjects, List<MdObject> otherObjects, List<MdObject> ancestorObjects, com._1c.g5.v8.dt.internal.md.compare.MdObjectResource mainResource, com._1c.g5.v8.dt.internal.md.compare.MdObjectResource otherResource, com._1c.g5.v8.dt.internal.md.compare.MdObjectResource ancestorResource, org.eclipse.xtext.naming.IQualifiedNameProvider qualifiedNameProvider, com._1c.g5.v8.dt.internal.md.compare.MdComparisonNodeFactory nodeFactory)
Constructs a matcher.- Parameters:
session
- the comparison session, notnull
parentCollectionNode
- the node related to the parent collection where the matching MD objects lie in, cannot benull
mainObjects
- the main objects to be matched, notnull
otherObjects
- the other objects to be matched, notnull
ancestorObjects
- the ancestor objects to be matched, may benull
in case of two-way comparisonmainResource
- the main resource, may benull
otherResource
- the other resource, may benull
ancestorResource
- the common ancestor resource, may benull
qualifiedNameProvider
- the qualified name provider for obtaining symbolic links of the matched objects, notnull
nodeFactory
- the factory to create MD comparison nodes, notnull
-
-
Method Detail
-
getName
protected String getName(MdObject object)
Description copied from class:AbstractMdObjectMatcher
Returns the name of the matched object.- Specified by:
getName
in classAbstractMdObjectMatcher<MdObject>
- Returns:
- the name
-
getUuid
protected UUID getUuid(MdObject object)
Description copied from class:AbstractMdObjectMatcher
Returns the UUID of the matched object.- Specified by:
getUuid
in classAbstractMdObjectMatcher<MdObject>
- Returns:
- the UUID
-
getSymlink
protected String getSymlink(MdObject object)
Description copied from class:AbstractMdObjectMatcher
Returns the symbolic link of the matched object.- Specified by:
getSymlink
in classAbstractMdObjectMatcher<MdObject>
- Returns:
- the symbolic link
-
createNode
protected MdObjectComparisonNode createNode(MdObject main, MdObject other, MdObject ancestor)
Description copied from class:AbstractMdObjectMatcher
Creates a comparison node for the triple of matched objects. At least one of objects in the triple must not benull
.- Specified by:
createNode
in classAbstractMdObjectMatcher<MdObject>
- Parameters:
main
- the main object, may benull
other
- the other object, may benull
ancestor
- the common ancestor object, may benull
- Returns:
- a new comparison node related to the triple of objects, never
null
-
-