Package com._1c.g5.v8.dt.compare.core
Class ComparisonNodeFactory
- java.lang.Object
-
- com._1c.g5.v8.dt.compare.core.ComparisonNodeFactory
-
public class ComparisonNodeFactory extends Object
Factory to produce comparison nodes and to attach them to the comparison model.
-
-
Constructor Summary
Constructors Constructor Description ComparisonNodeFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T extends ComparisonNode>
Tcreate(org.eclipse.emf.ecore.EClass nodeType)
Creates new comparison node instance.protected <T extends CollectionComparisonNode>
TcreateCollectionNode(org.eclipse.emf.ecore.EClass nodeType, ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for some collection.ContainmentCollectionElementComparisonNode
createContainmentCollectionElementComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, MatchedEmfObjects matchedObjects, ComparedFeatures<?> collectionFeatures, int positionAfterMerge, IComparisonSession session)
Creates a comparison node for the element in the containment collection.ContainmentCollectionComparisonNode
createContainmentCollectionNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for some containment collection.ExternalPropertyComparisonNode
createExternalPropertyNode(ComparisonNode parent, ExternalPropertyComparisonData extPropData, IComparisonSession session)
Creates a comparison node for some external property.ReferenceCollectionElementComparisonNode
createReferenceCollectionElementComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, MatchedReference matchedRef, ComparedFeatures<?> collectionFeatures, int positionAfterMerge, IComparisonSession session)
Creates a comparison node for the element in the reference (non-containment) collection.ReferenceCollectionComparisonNode
createReferenceCollectionNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for some reference collection.protected RelatedFeature
createRelatedFeature(org.eclipse.emf.ecore.EStructuralFeature feature, IComparisonSession session)
Creates related feature object from the givenEStructuralFeature
instance.SingleContainmentFeatureComparisonNode
createSingleContainmentComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, MatchedEmfObjects matchedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for a single containment feature.SingleReferenceFeatureComparisonNode
createSingleReferenceComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedSymlinks matchedSymlinks, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for a single reference (non-containment) feature.SingleValueComparisonNode
createSingleValueComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedObjects<?> comparedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for a single value.
-
-
-
Method Detail
-
createSingleValueComparisonNode
public SingleValueComparisonNode createSingleValueComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedObjects<?> comparedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for a single value.- Parameters:
parent
- the parent comparison node this node to be attached to, cannot benull
parentComparedObjects
- the triple of parent compared objects, cannot benull
comparedObjects
- the triple of compared objects this node to be related to, cannot benull
comparedFeatures
- the triple of features identifying the single value, cannot benull
session
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
createSingleReferenceComparisonNode
public SingleReferenceFeatureComparisonNode createSingleReferenceComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedSymlinks matchedSymlinks, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for a single reference (non-containment) feature.- Parameters:
parent
- the parent comparison node this node to be attached to, cannot benull
parentComparedObjects
- the triple of parent compared objects, cannot benull
matchedSymlinks
- the triple of matched symlinks this node to be related to, cannot benull
comparedFeatures
- the triple of features identifying the single reference, cannot benull
session
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
createSingleContainmentComparisonNode
public SingleContainmentFeatureComparisonNode createSingleContainmentComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, MatchedEmfObjects matchedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for a single containment feature.- Parameters:
parent
- the parent comparison node this node to be attached to, cannot benull
matchedObjects
- the triple of matched objects this node to be related to, cannot benull
comparedFeatures
- the triple of features identifying the single containment, cannot benull
session
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
createReferenceCollectionNode
public ReferenceCollectionComparisonNode createReferenceCollectionNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for some reference collection.- Parameters:
parent
- the parent comparison node this node to be attached to, cannot benull
parentComparedObjects
- the triple of parent objects containing the collection, cannot benull
comparedFeatures
- the triple of features identifying the reference collection, cannot benull
session
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
createContainmentCollectionNode
public ContainmentCollectionComparisonNode createContainmentCollectionNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for some containment collection.- Parameters:
parent
- the parent comparison node this node to be attached to, cannot benull
parentComparedObjects
- the triple of parent objects containing the collection, cannot benull
comparedFeatures
- the triple of features identifying the containment collection, cannot benull
session
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
createReferenceCollectionElementComparisonNode
public ReferenceCollectionElementComparisonNode createReferenceCollectionElementComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, MatchedReference matchedRef, ComparedFeatures<?> collectionFeatures, int positionAfterMerge, IComparisonSession session)
Creates a comparison node for the element in the reference (non-containment) collection.- Parameters:
parent
- the parent comparison node this node to be attached to, cannot benull
parentComparedObjects
- the triple of parent objects containing the collection, cannot benull
matchedRef
- the triple of matched references this node to be related to, cannot benull
collectionFeatures
- the triple of features identifying the parent collection, cannot benull
positionAfterMerge
- the expected position of the element after merge finishsession
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
createContainmentCollectionElementComparisonNode
public ContainmentCollectionElementComparisonNode createContainmentCollectionElementComparisonNode(ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, MatchedEmfObjects matchedObjects, ComparedFeatures<?> collectionFeatures, int positionAfterMerge, IComparisonSession session)
Creates a comparison node for the element in the containment collection.- Parameters:
parent
- the parent comparison node this node to be attached to, cannot benull
parentComparedObjects
- the triple of parent objects containing the collection, cannot benull
matchedObjects
- the triple of matched collection elements this node to be related to, cannot benull
collectionFeatures
- the triple of features identifying the parent collection, cannot benull
positionAfterMerge
- the expected position of the element after merge finishsession
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
createExternalPropertyNode
public ExternalPropertyComparisonNode createExternalPropertyNode(ComparisonNode parent, ExternalPropertyComparisonData extPropData, IComparisonSession session)
Creates a comparison node for some external property.- Parameters:
parent
- the parent comparison node this node to be attached to, cannot benull
extPropData
- the external property data to create the comparison node from, cannot benull
session
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
createRelatedFeature
protected final RelatedFeature createRelatedFeature(org.eclipse.emf.ecore.EStructuralFeature feature, IComparisonSession session)
Creates related feature object from the givenEStructuralFeature
instance.- Parameters:
feature
- the feature to create related feature object for, cannot benull
session
- the comparison session, cannot benull
- Returns:
- the related feature object, never
null
-
create
protected <T extends ComparisonNode> T create(org.eclipse.emf.ecore.EClass nodeType)
Creates new comparison node instance.- Type Parameters:
T
- the type of node to return, must inheritContainmentComparisonNode
- Parameters:
nodeType
- theEClass
of node to be created, cannot benull
- Returns:
- the comparison node created, never
null
-
createCollectionNode
protected <T extends CollectionComparisonNode> T createCollectionNode(org.eclipse.emf.ecore.EClass nodeType, ComparisonNode parent, AbstractComparedEmfObjects<?> parentComparedObjects, ComparedFeatures<?> comparedFeatures, IComparisonSession session)
Creates a comparison node for some collection.- Type Parameters:
T
- the type of collection node to return, must inheritCollectionComparisonNode
- Parameters:
nodeType
- theEClass
of node to be created, cannot benull
parent
- the parent comparison node this node to be attached to, cannot benull
parentComparedObjects
- the triple of parent objects containing the collection, cannot benull
comparedFeatures
- the triple of features identifying the collection, cannot benull
session
- the comparison session this node to be added to, cannot benull
- Returns:
- the comparison node created, never
null
-
-