Package com._1c.g5.v8.dt.md.copy
Class ModelObjectCopier
java.lang.Object
com._1c.g5.v8.dt.md.copy.ModelObjectCopier
- Direct Known Subclasses:
- AttachingModelObjectCopier
Model object copier allows to copy model objects.
 Copier allows to copy metadata objects to different target classes, e.g. clients may copy 
Document
 to Catalog, or even to CatalogAttribute and only matching attributes will be copied.
 
 ModelObjectCopier instances are stateless, may be used multiple times to copy multiple objects and
 by multiple threads.
 
Clients may extend copier and customize copy and attach process.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classCopy process context that holds information about copied objects, references, external properties names, etc.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final IEditingLanguageManagerprotected final IModelObjectFactoryprotected static final StringModel objects produced types feature name.protected final IRuntimeVersionSupportprotected final IV8ProjectManager
- 
Constructor SummaryConstructorsConstructorDescriptionModelObjectCopier(IV8ProjectManager v8projectManager, IModelObjectFactory modelFactory, IRuntimeVersionSupport runtimeVersionSupport, IEditingLanguageManager editingLanguageManager) Constructor ofModelObjectCopier.
- 
Method SummaryModifier and TypeMethodDescriptionprotected org.eclipse.emf.ecore.EObjectattach(org.eclipse.emf.ecore.EObject copy, org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference reference) Attach the result model object copy using the providedparentobject reference.org.eclipse.emf.ecore.EObjectcopy(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EClass toClass) Copies the given model object and returns a copy of the providedtoClasstype.protected org.eclipse.emf.ecore.EObjectcopy(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EClass toClass, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference reference, ModelObjectCopier.CopyContext context) Copies the given model object and returns a copy of the providedtoClasstype.org.eclipse.emf.ecore.EObjectcopy(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference reference) Copies the given model object in appropriate class for the providedparentobject and reference type.<T extends org.eclipse.emf.ecore.EObject>
 Tcopy(T eObject) Copies the given model object and returns a copy of the same type.protected voidcopyAccountingFlag(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, org.eclipse.emf.ecore.EObject fromAccountingFlag, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy reference to the accounting flag getting fromAccountingRegisterResourceprotected voidcopyAttribute(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EAttribute fromAttribute, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EAttribute toAttribute, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference reference, ModelObjectCopier.CopyContext context) Copy the provided model object attribute.protected voidcopyAttributeValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EAttribute eAttribute, Object value, org.eclipse.emf.ecore.EStructuralFeature.Setting setting) Copy the provided model object attribute value.protected <T> Collection<T>copyCollection(Collection<? extends T> eObjects, org.eclipse.emf.ecore.EClass toClass, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference targetReference, ModelObjectCopier.CopyContext context) Copy the collection of model objects to the providedtoClassant target parent reference.protected voidcopyContainment(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Copy the model object containment reference feature.protected voidcopyExternalDataSourceSubObjects(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyObject, org.eclipse.emf.ecore.EReference toReference, org.eclipse.emf.ecore.EReference fromReference, ModelObjectCopier.CopyContext context) Copies sub objects ofExternalDataSources andCubesprotected voidcopyExternalPropertyReference(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object external property reference feature.protected voidcopyFeatureMap(org.eclipse.emf.ecore.util.FeatureMap featureMap, ModelObjectCopier.CopyContext context) Copy the model object feature map.protected voidcopyHelp(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromHelpReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toHelpReference, ModelObjectCopier.CopyContext context) Copy the model objectHelp.protected voidcopyMdName(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EAttribute fromAttribute, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EAttribute toAttribute, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference reference, ModelObjectCopier.CopyContext context) Copy the metadata model object name.protected voidcopyReference(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature.protected voidcopyReferenceField(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature of theFieldtype.protected voidcopyReferenceFields(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature of theFieldtype.protected voidcopyReferences(ModelObjectCopier.CopyContext context, org.eclipse.emf.ecore.EObject parent, boolean resolveProxies, boolean useOriginalReferences) Copy all references in the providedCopyContextcopies.protected voidcopyReferences(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyObject, ModelObjectCopier.CopyContext context, org.eclipse.emf.ecore.EObject parent, boolean resolveProxies, boolean useOriginalReferences) Copy all references of the provided copy object.protected voidcopyReferenceSubsystem(Subsystem subsystem, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, org.eclipse.emf.ecore.EObject parent, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature from the subsystem object.protected voidcopyReferenceTypeDescription(TypeDescription typeDescription, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject copyEObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature from the type description object.protected voidcopySourceAsReferenceType(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Copy the source object as reference to source type in the terms of V8 metadata model.protected ModelObjectCopier.CopyContextcreateContext(org.eclipse.emf.ecore.EClass toClass) Creates copy context.protected ModelObjectCopier.CopyContextcreateContext(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference reference) Creates copy context.protected org.eclipse.emf.ecore.EObjectcreateCopy(org.eclipse.emf.ecore.EObject sourceObject, org.eclipse.emf.ecore.EClass targetClass, org.eclipse.emf.ecore.EObject targetParent) Create copy object of the provided source object, target class and parent.protected StringgenerateMdCopyName(MdObject sourceObject, MdObject targetObject, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference reference, ModelObjectCopier.CopyContext copyContext) Generate copied model metadata object name.protected StringgetName(org.eclipse.emf.ecore.EObject object) Returns the name of the provided object ornullif it cannot be obtained.protected org.eclipse.emf.ecore.EStructuralFeaturegetTarget(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature) Returns the target feature used to populate a copy instance from the given source feature.protected org.eclipse.emf.ecore.EStructuralFeature.SettinggetTarget(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyObject) Returns a setting for the feature and copy instance to be populated with the original object source feature value.protected booleanisAdditionalIndexesReference(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to additional indexes.protected booleanisChanged(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EStructuralFeature fromFeature, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EStructuralFeature toFeature) Returns whether feature value was changed and is needed to copy.protected booleanisExternalProperty(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is external property.protected booleanisFormReference(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to form.protected booleanisGraphicalSchemeReference(org.eclipse.emf.ecore.EObject original, org.eclipse.emf.ecore.EObject externalProperty) Returns whether the provided reference is referenced to graphical scheme.protected booleanisHtmlDocumentTemplateReference(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to template.protected booleanisNotAnnotatedExternalResource(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EObject toObject) Returns whether objects is external resource not annotated in model.protected booleanisProxyAdditionalIndexesReference(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is proxy referenced to additional indexes.protected booleanisRightsReference(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to rights.protected booleanisStyleReference(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to style.protected booleannameExists(String nameCandidate, Collection<String> existingNames, ModelObjectCopier.CopyContext copyContext, org.eclipse.emf.ecore.EClass eClass) Returns whether the name candidate already exists in the provided existing name collection or in the provided copy context.protected booleanshouldCopyAttribute(org.eclipse.emf.ecore.EAttribute fromAttribute, org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EAttribute toAttribute, org.eclipse.emf.ecore.EObject toObject, ModelObjectCopier.CopyContext context) Returns whether need to copy the provided attribute.protected booleanshouldCopyContainment(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Returns whether need to copy the provided containment reference.protected booleanshouldCopyExternalPropertyReference(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Returns whether need to copy the provided external property reference.protected booleanshouldCopyReference(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Returns whether need to copy the provided non-containment reference.
- 
Field Details- 
PRODUCED_TYPES_FEATURE_NAMEModel objects produced types feature name. Value is "producedTypes".- See Also:
 
- 
v8projectManager
- 
modelFactory
- 
runtimeVersionSupport
- 
editingLanguageManager
 
- 
- 
Constructor Details- 
ModelObjectCopier@Inject public ModelObjectCopier(IV8ProjectManager v8projectManager, IModelObjectFactory modelFactory, IRuntimeVersionSupport runtimeVersionSupport, IEditingLanguageManager editingLanguageManager) Constructor ofModelObjectCopier.- Parameters:
- v8projectManager- the V8 project manager, cannot be- null
- modelFactory- the model object factory, cannot be- null
- runtimeVersionSupport- the 1C:Enterprise runtime version support, cannot be- null
- editingLanguageManager- the editing language manager, cannot be- null
 
 
- 
- 
Method Details- 
copypublic <T extends org.eclipse.emf.ecore.EObject> T copy(T eObject) Copies the given model object and returns a copy of the same type.- Parameters:
- eObject- the model object to copy, cannot be- null
- Returns:
- a copy of the same type, never null
 
- 
copypublic org.eclipse.emf.ecore.EObject copy(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EClass toClass) Copies the given model object and returns a copy of the providedtoClasstype. Copies only matched features.This method allows to copy metadata objects to different target classes, e.g. clients may copy DocumenttoCatalog, or even toCatalogAttributeand only matching attributes will be copied.- Parameters:
- eObject- the model object to copy, cannot be- null
- toClass- the result model class, cannot be- null
- Returns:
- a copy of the provided type, never null
 
- 
copypublic org.eclipse.emf.ecore.EObject copy(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference reference) Copies the given model object in appropriate class for the providedparentobject and reference type.This method allows to copy metadata objects to different target classes, e.g. clients may copy DocumenttoCatalog, or even toCatalogAttributeand only matching attributes will be copied.- Parameters:
- eObject- the model object to copy, cannot be- null
- parent- the target parent, cannot be- null
- reference- the reference parent, cannot be- null
- Returns:
- a copy of the appropriate type, never null
 
- 
attachprotected org.eclipse.emf.ecore.EObject attach(org.eclipse.emf.ecore.EObject copy, org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference reference) Attach the result model object copy using the providedparentobject reference. Returns attached object. Method is called after source object copy and before its references copy.- Parameters:
- copy- the model object copy to attach, cannot be- null
- parent- the target parent, cannot be- null
- reference- the parent reference, cannot be- null
- Returns:
- the attached object, never null
 
- 
copyprotected org.eclipse.emf.ecore.EObject copy(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EClass toClass, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference reference, ModelObjectCopier.CopyContext context) Copies the given model object and returns a copy of the providedtoClasstype. Copies only matched features.- Parameters:
- eObject- the model object to copy, cannot be- null
- toClass- the result model class, cannot be- null
- targetParent- the target parent to copy to or- nullif none
- reference- the parent reference to copy to or- nullif none
- context- the copy context, cannot be- null
- Returns:
- a copy of the provided type, never null
 
- 
copyAttributeprotected void copyAttribute(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EAttribute fromAttribute, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EAttribute toAttribute, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference reference, ModelObjectCopier.CopyContext context) Copy the provided model object attribute.- Parameters:
- fromObject- the object to copy attribute from, cannot be- null
- fromAttribute- the attribute to copy value from, cannot be- null
- fromObject- the object to copy attribute to, cannot be- null
- fromAttribute- the attribute to copy value to, cannot be- null
- targetParent- the target parent to copy to or- nullif none
- reference- the parent reference to copy to or- nullif none
- context- the copy context, cannot be- null
 
- 
copyAttributeValueprotected void copyAttributeValue(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EAttribute eAttribute, Object value, org.eclipse.emf.ecore.EStructuralFeature.Setting setting) Copy the provided model object attribute value.- Parameters:
- eObject- the object to copy attribute to, cannot be- null
- eAttribute- the attribute to copy value to, cannot be- null
- value- the value to copy, cannot be- null
- setting- the feature setting, cannot be- null
 
- 
copyCollectionprotected <T> Collection<T> copyCollection(Collection<? extends T> eObjects, org.eclipse.emf.ecore.EClass toClass, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference targetReference, ModelObjectCopier.CopyContext context) Copy the collection of model objects to the providedtoClassant target parent reference.- Parameters:
- eObjects- the objects to copy, cannot be- null
- toClass- the result model class, cannot be- null
- targetParent- the target parent, cannot be- null
- targetReference- the reference parent, cannot be- null
- context- the copy context, cannot be- null
- Returns:
- a copied collection, never null
 
- 
copyContainmentprotected void copyContainment(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Copy the model object containment reference feature.- Parameters:
- fromObject- the object to copy containment reference feature from, cannot be- null
- fromReference- the containment reference feature to copy, cannot be- null
- toObject- the object to copy containment reference feature to, cannot be- null
- toReference- the containment reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
 
- 
copyExternalPropertyReferenceprotected void copyExternalPropertyReference(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object external property reference feature.- Parameters:
- fromObject- the object to copy external property from, cannot be- null
- fromReference- the external property to copy, cannot be- null
- toObject- the object to copy external property to, cannot be- null
- toReference- the external property to copy to, cannot be- null
- context- the copy context, cannot be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copyFeatureMapprotected void copyFeatureMap(org.eclipse.emf.ecore.util.FeatureMap featureMap, ModelObjectCopier.CopyContext context) Copy the model object feature map.- Parameters:
- featureMap- the feature map to copy, cannot be- null
- context- the copy context, cannot be- null
 
- 
copyHelpprotected void copyHelp(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromHelpReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toHelpReference, ModelObjectCopier.CopyContext context) Copy the model objectHelp.- Parameters:
- fromObject- the object to copy help from, cannot be- null
- fromHelpReference- the help reference to copy, cannot be- null
- toObject- the object to copy help to, cannot be- null
- toHelpReference- the help reference to copy to, cannot be- null
- context- the copy context, cannot be- null
 
- 
copyMdNameprotected void copyMdName(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EAttribute fromAttribute, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EAttribute toAttribute, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference reference, ModelObjectCopier.CopyContext context) Copy the metadata model object name.- Parameters:
- fromObject- the object to copy name from, cannot be- null
- fromAttribute- the name attribute to copy, cannot be- null
- toObject- the object to copy name to, cannot be- null
- toAttribute- the name attribute to copy to, cannot be- null
- targetParent- the target parent to copy to or- nullif none
- reference- the parent reference to copy to or- nullif none
- context- the copy context, cannot be- null
 
- 
copyReferenceprotected void copyReference(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature.- Parameters:
- fromObject- the object to copy reference feature from, cannot be- null
- fromReference- the reference feature to copy, cannot be- null
- toObject- the object to copy reference feature to, cannot be- null
- toReference- the reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copyReferenceFieldsprotected void copyReferenceFields(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature of theFieldtype.- Parameters:
- fromObject- the object to copy reference feature from, cannot be- null
- fromReference- the reference feature to copy, cannot be- null
- toObject- the object to copy reference feature to, cannot be- null
- toReference- the reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copyReferenceFieldprotected void copyReferenceField(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature of theFieldtype.- Parameters:
- fromObject- the object to copy reference feature from, cannot be- null
- fromReference- the reference feature to copy, cannot be- null
- toObject- the object to copy reference feature to, cannot be- null
- toReference- the reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copyReferencesprotected void copyReferences(ModelObjectCopier.CopyContext context, org.eclipse.emf.ecore.EObject parent, boolean resolveProxies, boolean useOriginalReferences) Copy all references in the providedCopyContextcopies.- Parameters:
- context- the copy context, cannot be- null
- parent- the parent, can be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copyReferencesprotected void copyReferences(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyObject, ModelObjectCopier.CopyContext context, org.eclipse.emf.ecore.EObject parent, boolean resolveProxies, boolean useOriginalReferences) Copy all references of the provided copy object.- Parameters:
- eObject- the original object, cannot be- null
- copyObject- the copied object, cannot be- null
- context- the copy context, cannot be- null
- parent- the parent, can be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copyAccountingFlagprotected void copyAccountingFlag(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, org.eclipse.emf.ecore.EObject fromAccountingFlag, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy reference to the accounting flag getting fromAccountingRegisterResource- Parameters:
- fromObject- the object to copy reference feature from, cannot be- null
- fromReference- the reference feature to copy, cannot be- null
- toObject- the object to copy reference feature to, cannot be- null
- toReference- the reference feature to copy, cannot be- null
- fromAccountingFlag- original accounting flag of AccountRegister, cannot be- null
- context- the copy context, cannot be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copyReferenceSubsystemprotected void copyReferenceSubsystem(Subsystem subsystem, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, org.eclipse.emf.ecore.EObject parent, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature from the subsystem object.- Parameters:
- subsystem- the object to copy reference feature from, cannot be- null
- fromReference- the reference feature to copy, cannot be- null
- toObject- the object to copy reference feature to, cannot be- null
- toReference- the reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
- parent- the parent, can be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copyReferenceTypeDescriptionprotected void copyReferenceTypeDescription(TypeDescription typeDescription, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject copyEObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context, boolean resolveProxies, boolean useOriginalReferences) Copy the model object non-containment reference feature from the type description object.- Parameters:
- typeDescription- the object to copy reference feature from, cannot be- null
- fromReference- the reference feature to copy, cannot be- null
- toObject- the object to copy reference feature to, cannot be- null
- toReference- the reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
- resolveProxies- whether proxies should be resolved while copying
- useOriginalReferences- whether non-copied references should be used while copying
 
- 
copySourceAsReferenceTypeprotected void copySourceAsReferenceType(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Copy the source object as reference to source type in the terms of V8 metadata model. If cannot copy then do nothing.- Parameters:
- eObject- the original object, cannot be- null
- copyObject- the copied object, cannot be- null
- toReference- the type description reference to copy source as type to, cannot be- null
- context- the copy context, cannot be- null
 
- 
createContextCreates copy context. Subclasses may override and provide more specific copy context.- Parameters:
- toClass- the result model class, cannot be- null
- Returns:
- the created copy context, never null
 
- 
createContextprotected ModelObjectCopier.CopyContext createContext(org.eclipse.emf.ecore.EObject parent, org.eclipse.emf.ecore.EReference reference) Creates copy context. Subclasses may override and provide more specific copy context.- Parameters:
- parent- the target parent, cannot be- null
- reference- the reference parent, cannot be- null
- Returns:
- the created copy context, never null
 
- 
createCopyprotected org.eclipse.emf.ecore.EObject createCopy(org.eclipse.emf.ecore.EObject sourceObject, org.eclipse.emf.ecore.EClass targetClass, org.eclipse.emf.ecore.EObject targetParent) Create copy object of the provided source object, target class and parent.- Parameters:
- sourceObject- the source object to copy, cannot be- null
- targetClass- the result model class, cannot be- null
- targetParent- the result model parent, cannot be- null
- Returns:
- the created model copy object, never null
 
- 
nameExistsprotected boolean nameExists(String nameCandidate, Collection<String> existingNames, ModelObjectCopier.CopyContext copyContext, org.eclipse.emf.ecore.EClass eClass) Returns whether the name candidate already exists in the provided existing name collection or in the provided copy context.- Parameters:
- nameCandidate- the name candidate to check, cannot be- null
- existingNames- the existing name collection to check for, cannot be- null
- copyContext- the copy context to check for, cannot be- null
- eClass- the class of the candidate, cannot be- null
- Returns:
- whether the name candidate already exists in the provided existing name collection or in the provided copy context
 
- 
generateMdCopyNameprotected String generateMdCopyName(MdObject sourceObject, MdObject targetObject, org.eclipse.emf.ecore.EObject targetParent, org.eclipse.emf.ecore.EReference reference, ModelObjectCopier.CopyContext copyContext) Generate copied model metadata object name.- Parameters:
- sourceObject- the source object to copy, cannot be- null
- targetObject- the target object to copy, cannot be- null
- targetParent- the target parent to copy to or- nullif none
- reference- the parent reference to copy to or- nullif none
- context- the copy context, cannot be- null
- Returns:
- the copied model metadata object name, never null
 
- 
getNameReturns the name of the provided object ornullif it cannot be obtained.- Parameters:
- object- the model object to get name of, cannot be- null
- Returns:
- the name of the provided object or nullif it cannot be obtained
 
- 
getTargetprotected org.eclipse.emf.ecore.EStructuralFeature getTarget(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature) Returns the target feature used to populate a copy instance from the given source feature.- Parameters:
- eStructuralFeature- the source feature, cannot be- null
- Returns:
- the target feature used to populate a copy instance, or nullif none
 
- 
getTargetprotected org.eclipse.emf.ecore.EStructuralFeature.Setting getTarget(org.eclipse.emf.ecore.EStructuralFeature eStructuralFeature, org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyObject) Returns a setting for the feature and copy instance to be populated with the original object source feature value.- Parameters:
- eStructuralFeature- the source feature, cannot be- null
- eObject- the original object, cannot be- null
- copyObject- the copied object, cannot be- null
- Returns:
- the target feature used to populate a copy instance.
 
- 
isFormReferenceprotected boolean isFormReference(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to form.- Parameters:
- reference- the reference to check, cannot be- null
- Returns:
- whether the provided reference is referenced to form.
 
- 
isStyleReferenceprotected boolean isStyleReference(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to style.- Parameters:
- reference- the reference to check, cannot be- null
- Returns:
- whether the provided reference is referenced to style.
 
- 
isAdditionalIndexesReferenceprotected boolean isAdditionalIndexesReference(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to additional indexes.- Parameters:
- reference- the reference to check, cannot be- null
- Returns:
- whether the provided reference is referenced to additional indexes.
 
- 
isProxyAdditionalIndexesReferenceprotected boolean isProxyAdditionalIndexesReference(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is proxy referenced to additional indexes.- Parameters:
- eObject- the object to copy from, cannot be- null
- reference- the reference to check, cannot be- null
- Returns:
- whether the provided reference is proxy referenced to additional indexes.
 
- 
isGraphicalSchemeReferenceprotected boolean isGraphicalSchemeReference(org.eclipse.emf.ecore.EObject original, org.eclipse.emf.ecore.EObject externalProperty) Returns whether the provided reference is referenced to graphical scheme.- Parameters:
- original- original copying object, can't be- null
- externalProperty- the external property, cannot be- null
- Returns:
- whether the provided reference is referenced to graphical scheme.
 
- 
isRightsReferenceprotected boolean isRightsReference(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to rights.- Parameters:
- reference- the reference to check, cannot be- null
- Returns:
- whether the provided reference is referenced to rights.
 
- 
isNotAnnotatedExternalResourceprotected boolean isNotAnnotatedExternalResource(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EObject toObject) Returns whether objects is external resource not annotated in model.- Parameters:
- fromObject- the object to copy from, cannot be- null
- toObject- the object to copy to, cannot be- null
- Returns:
- whether objects is external resource not annotated in model.
 
- 
isHtmlDocumentTemplateReferenceprotected boolean isHtmlDocumentTemplateReference(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is referenced to template.- Parameters:
- context- the context object to check, cannot be- null
- reference- the reference to check, cannot be- null
- Returns:
- whether the provided reference is referenced to template.
 
- 
isChangedprotected boolean isChanged(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EStructuralFeature fromFeature, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EStructuralFeature toFeature) Returns whether feature value was changed and is needed to copy.- Parameters:
- fromObject- the object to copy feature from, cannot be- null
- fromFeature- the feature to copy, cannot be- null
- toObject- the object to copy feature to, cannot be- null
- toFeature- the feature to copy, cannot be- null
- Returns:
- whether feature value was changed and is needed to copy
 
- 
isExternalPropertyprotected boolean isExternalProperty(org.eclipse.emf.ecore.EReference reference) Returns whether the provided reference is external property.- Parameters:
- reference- the reference to check, cannot be- null
- Returns:
- whether the provided reference is external property
 
- 
shouldCopyAttributeprotected boolean shouldCopyAttribute(org.eclipse.emf.ecore.EAttribute fromAttribute, org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EAttribute toAttribute, org.eclipse.emf.ecore.EObject toObject, ModelObjectCopier.CopyContext context) Returns whether need to copy the provided attribute. Default implementation copy allows to copy all attributes except metadata UUID.- Parameters:
- fromObject- the object to copy attribute from, cannot be- null
- fromAttribute- the attribute to copy value from, cannot be- null
- fromObject- the object to copy attribute to, cannot be- null
- fromAttribute- the attribute to copy value to, cannot be- null
- context- the copy context, cannot be- null
- Returns:
- whether need to copy the provided attribute
 
- 
shouldCopyContainmentprotected boolean shouldCopyContainment(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Returns whether need to copy the provided containment reference. Default implementation allows to copy all non-transient containment references exceptproducedTypesreference.- Parameters:
- fromObject- the object to copy containment reference feature from, cannot be- null
- fromReference- the containment reference feature to copy, cannot be- null
- toObject- the object to copy containment reference feature to, cannot be- null
- toReference- the containment reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
- Returns:
- whether need to copy the provided containment reference
 
- 
shouldCopyReferenceprotected boolean shouldCopyReference(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Returns whether need to copy the provided non-containment reference. Default implementation allows to copy all non-transient references and external properties references.- Parameters:
- fromObject- the object to copy non-containment reference feature from, cannot be- null
- fromReference- the non-containment reference feature to copy, cannot be- null
- toObject- the object to copy non-containment reference feature to, cannot be- null
- toReference- the non-containment reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
- Returns:
- whether need to copy the provided non-containment reference
 
- 
shouldCopyExternalPropertyReferenceprotected boolean shouldCopyExternalPropertyReference(org.eclipse.emf.ecore.EObject fromObject, org.eclipse.emf.ecore.EReference fromReference, org.eclipse.emf.ecore.EObject toObject, org.eclipse.emf.ecore.EReference toReference, ModelObjectCopier.CopyContext context) Returns whether need to copy the provided external property reference. Default implementation always returnstrue.- Parameters:
- fromObject- the object to copy external property reference feature from, cannot be- null
- fromReference- the external property reference feature to copy, cannot be- null
- toObject- the object to copy external property reference feature to, cannot be- null
- toReference- the external property reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
- Returns:
- whether need to copy the provided external property reference
 
- 
copyExternalDataSourceSubObjectsprotected void copyExternalDataSourceSubObjects(org.eclipse.emf.ecore.EObject eObject, org.eclipse.emf.ecore.EObject copyObject, org.eclipse.emf.ecore.EReference toReference, org.eclipse.emf.ecore.EReference fromReference, ModelObjectCopier.CopyContext context) Copies sub objects ofExternalDataSources andCubes- Parameters:
- eObject- the object to copy sub objects from, cannot be- null
- copyObject- the object to copy sub objects to, cannot be- null
- toReference- the sub objects reference feature to copy, cannot be- null
- fromReference- the sub objects reference feature to copy, cannot be- null
- context- the copy context, cannot be- null
 
 
-