|
OCL | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.topcased.checkresultmodel.helper.CheckResultModelHelper
public class CheckResultModelHelper
Helper class proposing a set of convenient static methods to easily handle CheckResultModel.
Constructor Summary | |
---|---|
CheckResultModelHelper()
|
Method Summary | |
---|---|
static void |
createAcceptedItems(Rule rule,
java.util.List<?> acceptedItems)
Creates a list of the accepted items concerning a rule. |
static Model |
createCheckResulModel(EObject model,
EPackage package_,
EClass context,
java.lang.String rule)
Creates a default Topcased CheckResultModel |
static Context |
createContext(Package package_,
EClass context)
Creates a Context and adds it to the current Package |
static Package |
createPackage(Model model,
EPackage ePackage)
Creates a Package and adds it to the Check Result Model |
static void |
createRejectedItems(Rule rule,
java.util.List<?> acceptedItems)
Creates a list of the rejected items concerning a rule. |
static Rule |
createRule(Context context,
java.lang.String rule)
Creates a Rule and adds it to the current context |
static Rule |
getFirstRule(Model checkResultModel)
Gets the first Rule found into a given CheckResultModel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CheckResultModelHelper()
Method Detail |
---|
public static Model createCheckResulModel(EObject model, EPackage package_, EClass context, java.lang.String rule)
model
- The EMF modelmmURI
- The metamodel of the modelcontext
- The context where the rule must be take into accountrule
- The OCL rule
public static Package createPackage(Model model, EPackage ePackage)
model
- The check result modelePackage
- A EPackage to represent into the model
public static Context createContext(Package package_, EClass context)
package_
- The current Package of the check result modelcontext
- A EClass representing the context of an OCL rule.
public static Rule createRule(Context context, java.lang.String rule)
context
- the rule contextrule
- The rule applied
public static void createAcceptedItems(Rule rule, java.util.List<?> acceptedItems)
rule
- The rule on which the items must be addedacceptedItems
- List of accepted itemspublic static void createRejectedItems(Rule rule, java.util.List<?> acceptedItems)
rule
- The rule on which the items must be addedrejectedItems
- List of rejected itemspublic static Rule getFirstRule(Model checkResultModel)
checkResultModel
- A CheckResultModel previously created
|
OCL | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2005 TOPCASED Contributors 2005 - 2007. All rights reserved.