|
EGF Engine Release 0.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.egf.model.data.helper.ModelHelper
public class ModelHelper
Provides useful services based on model elements.
| Constructor Summary | |
|---|---|
ModelHelper()
|
|
| Method Summary | |
|---|---|
static FactoryComponentInvocation |
addFactoryComponentInvocation(FactoryComponent owningFC_p,
String referencedFCId_p)
Add a new factory component invocation to given FC. |
static void |
addReferencingContractContextElement(Context context_p,
String referencedFactoryComponentId_p,
String referencedContractElementId_p,
String value_p,
String contributorId_p)
Add a new context element (to given context) that references a contract element from another factory component. |
static void |
addViewpointTypeId(String patternViewpointId_p,
ViewpointType viewpointType_p,
FactoryComponent factoryComponent_p)
Add a viewpoint id in the specification of given factory component. |
static ContractElementReference |
createContractElementReferenceBasedOn(ContractElement contractElement_p)
Create a new contract element reference based on given contract element. |
static FactoryComponent |
createEmptyMinimalFC(String factoryComponentName_p)
Create a new Factory Component empty skeleton. |
static MappingModel |
createMappingModel(String mappingRelativePath_p,
String sourceFactoryComponentId_p,
String targetFactoryComponentId_p,
String mappingId_p)
Create a new mapping model with given parameters. |
static Contract |
getContract(FactoryComponent factoryComponent_p)
Get the contract for given factory component. |
static FactoryComponent |
getFactoryComponentContainer(NamedModelElementWithId modelElement_p)
Get the factory component where given model element is a child of. |
static FactoryComponent |
getFactoryComponentFrom(String factoryComponentName_p,
Collection<FactoryComponent> factoryComponents_p)
Get the factory component for specified factory component name in given fc collection. |
static PatternLibrary |
getLibrary(String libraryId_p,
PatternLibrary parentLibrary_p)
Get a library for specified id in given library children. |
static PatternLibrary |
getLibrary(String libraryId_p,
PatternViewpoint patternViewpoint_p)
Get a library for specified id in given pattern viewpoint. |
static List<ContractElement> |
getMandatoryContractElement(FactoryComponent factoryComponent_p)
Return a list of 'mandatory' contract element owned by specified factory component. |
static MappingModel |
getMapping(String mappingId_p,
List<MappingModel> mappings_p)
Get a mapping model in given list for specified mapping id. |
static List<MappingModel> |
getMappings(FactoryComponent factoryComponent_p)
Get all mappings contained in given factory component. |
static MappingViewpoint |
getMappingViewpoint(FactoryComponent factoryComponent_p)
Get mapping viewpoint for given factory component. |
static String |
getParentLibraryId(AbstractPatternElement patternElement_p)
Return the id of the parent library id for specified pattern element. |
static AbstractPatternElement |
getPatternElement(String shortPatternElementId_p,
PatternLibrary parentLibrary_p)
Get a first level child as AbstractPatternElement from given short pattern element id. |
static String |
getPatternElementShortId(AbstractPatternElement patternElement_p)
Return the short id of specified pattern element. |
static PatternViewpoint |
getPatternViewpoint(FactoryComponent factoryComponent_p)
Get the pattern viewpoint for given factory component. |
static ProductionPlan |
getProductionPlan(FactoryComponent factoryComponent_p)
Get the production plan for given factory component. |
static IProject |
getProject(NamedModelElementWithId modelElement_p)
Get the hosting project for given model element. |
static |
getViewpointTypeIds(Specification specification_p,
ViewpointType viewpointType_p)
Get the viewpoint ids for given specification and viewpoint type. |
static boolean |
isDomainDefined(Domain domain_p)
Is given domain defined ? |
static void |
setContextType(ContextElement contextElement_p,
String typeName_p)
Set the context type for given type name. |
static void |
setContractType(ContractElement contractElement_p,
String typeName_p)
Set the contract type for given type name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModelHelper()
| Method Detail |
|---|
public static FactoryComponent getFactoryComponentContainer(NamedModelElementWithId modelElement_p)
modelElement_p -
FactoryComponent instance or null if not found.
public static FactoryComponent getFactoryComponentFrom(String factoryComponentName_p,
Collection<FactoryComponent> factoryComponents_p)
factoryComponentName_p - the 'name' value of a factory component.
FactoryComponent instance or null if not found.
public static void addViewpointTypeId(String patternViewpointId_p,
ViewpointType viewpointType_p,
FactoryComponent factoryComponent_p)
patternViewpointId_p - viewpointType_p - factoryComponent_p - public staticgetViewpointTypeIds(Specification specification_p, ViewpointType viewpointType_p)
specification_p - viewpointType_p -
public static Contract getContract(FactoryComponent factoryComponent_p)
factoryComponent_p -
Contract instance or null if not defined.public static List<ContractElement> getMandatoryContractElement(FactoryComponent factoryComponent_p)
factoryComponent_p -
public static PatternViewpoint getPatternViewpoint(FactoryComponent factoryComponent_p)
factoryComponent_p -
PatternViewpoint instance or null if not defined.public static ProductionPlan getProductionPlan(FactoryComponent factoryComponent_p)
factoryComponent_p -
ProductionPlan instance or null if not defined.
public static void setContractType(ContractElement contractElement_p,
String typeName_p)
contractElement_p - typeName_p -
public static void setContextType(ContextElement contextElement_p,
String typeName_p)
contextElement_p - typeName_p - public static ContractElementReference createContractElementReferenceBasedOn(ContractElement contractElement_p)
contractElement_p -
ContractElementReference instance or null if given contract element is null.
public static PatternLibrary getLibrary(String libraryId_p,
PatternViewpoint patternViewpoint_p)
libraryId_p - patternViewpoint_p -
public static PatternLibrary getLibrary(String libraryId_p,
PatternLibrary parentLibrary_p)
libraryId_p - parentLibrary_p -
public static String getPatternElementShortId(AbstractPatternElement patternElement_p)
PatternLibrary or a PatternModel element.IPatternConstants.LIBRARY_PATTERN_ID_SEPARATOR
patternElement_p -
IPatternExtensionConstants#LIBRARY_PATTERN_ID_SEPARATOR.public static String getParentLibraryId(AbstractPatternElement patternElement_p)
patternElement_p -
public static AbstractPatternElement getPatternElement(String shortPatternElementId_p,
PatternLibrary parentLibrary_p)
AbstractPatternElement from given short pattern element id.
shortPatternElementId_p - parentLibrary_p -
null if not found or an AbstractPatternElement element.public static boolean isDomainDefined(Domain domain_p)
domain_p -
public static List<MappingModel> getMappings(FactoryComponent factoryComponent_p)
factoryComponent_p -
public static MappingViewpoint getMappingViewpoint(FactoryComponent factoryComponent_p)
factoryComponent_p -
public static FactoryComponent createEmptyMinimalFC(String factoryComponentName_p)
factoryComponentName_p -
FactoryComponent at the model level).
public static FactoryComponentInvocation addFactoryComponentInvocation(FactoryComponent owningFC_p,
String referencedFCId_p)
owningFC_p - The FC that is declaring the new factory component invocation, ie using it in its factory.referencedFCId_p - The FC pointed by the factory component invocation, ie implied in the execute of owner one.
public static void addReferencingContractContextElement(Context context_p,
String referencedFactoryComponentId_p,
String referencedContractElementId_p,
String value_p,
String contributorId_p)
context_p - The context being filled up.referencedFactoryComponentId_p - The factory component declaring the contract.referencedContractElementId_p - A contract element from this 'remote' contract.value_p - The context element value according to the contract element. No check is done here, so there may be a runtime error if the value does not
conform to the contract element declared type.contributorId_p - The plug-in id that contributes the context.
public static MappingModel createMappingModel(String mappingRelativePath_p,
String sourceFactoryComponentId_p,
String targetFactoryComponentId_p,
String mappingId_p)
mappingRelativePath_p - sourceFactoryComponentId_p - targetFactoryComponentId_p - mappingId_p -
public static MappingModel getMapping(String mappingId_p,
List<MappingModel> mappings_p)
mappingId_p - mappings_p -
MappingModel instance or null if not found.public static IProject getProject(NamedModelElementWithId modelElement_p)
modelElement_p -
IProject instance if given model element is contained by a factory component located in the workspace; null otherwise.
|
EGF Engine Release 0.1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright (c) Thales Corporate Services S.A.S, 2009.
This page is made available under license. For full details see the LEGAL in the documentation book that contains this page.