|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.emf.ocl.query.impl.QueryImpl
public class QueryImpl
An implementation of the model object 'Query'.
The following features are implemented:
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
|---|
org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl |
| Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
|---|
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList |
| Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject |
|---|
org.eclipse.emf.ecore.InternalEObject.EStore |
| Field Summary | |
|---|---|
static java.lang.String |
copyright
|
protected OCLExpression |
expression
The cached value of the ' Expression' reference |
protected static java.util.Map |
EXTENT_MAP_EDEFAULT
The default value of the ' Extent Map' attribute |
protected java.util.Map |
extentMap
The cached value of the ' Extent Map' attribute |
| Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
|---|
eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY |
| Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
|---|
EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET |
| Fields inherited from interface org.eclipse.emf.ecore.InternalEObject |
|---|
EOPPOSITE_FEATURE_BASE |
| Constructor Summary | |
|---|---|
protected |
QueryImpl()
|
protected |
QueryImpl(OCLExpression expr)
Creates a query from an OCLExpression (constraint or query). |
protected |
QueryImpl(java.lang.String qs)
Parses and validates the query according to the well-formedness rules. |
| Method Summary | |
|---|---|
OCLExpression |
basicGetExpression()
|
boolean |
check(java.util.List objList)
Determines whether all of the input objects satisfy the query. |
boolean |
check(java.lang.Object obj)
Evaluates the query on an object. |
java.lang.Object |
eGet(int featureID,
boolean resolve,
boolean coreType)
|
boolean |
eIsSet(int featureID)
|
void |
eSet(int featureID,
java.lang.Object newValue)
|
protected org.eclipse.emf.ecore.EClass |
eStaticClass()
|
void |
eUnset(int featureID)
|
java.lang.Object |
evaluate()
Evaluates the query. |
java.util.List |
evaluate(java.util.List objList)
Evaluates the query on the input list. |
java.lang.Object |
evaluate(java.lang.Object obj)
Evaluates the query on the object. |
EvaluationEnvironment |
getEvaluationEnvironment()
Obtains the evaluation environment that I use to evaluate OCL expressions. |
OCLExpression |
getExpression()
|
java.util.Map |
getExtentMap()
|
java.lang.String |
queryText()
Translates the query back to an OCL text string. |
java.util.List |
reject(java.util.List objList)
Determines the subset of input objects that do not satisfy the query. |
org.eclipse.emf.ecore.EClassifier |
resultType()
Obtains the OCL result type of the query. |
java.util.List |
select(java.util.List objList)
Determines the subset of input objects that satisfy the query. |
void |
setEvaluationEnvironment(EvaluationEnvironment env)
Sets the evaluation environment that I use to evaluate OCL expressions. |
void |
setExtentMap(java.util.Map newExtentMap)
|
java.lang.String |
toString()
|
protected void |
validate()
Validates me according to the rules for OCL well-formedness. |
| Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl |
|---|
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI |
| Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl |
|---|
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInverseRemove, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues |
| Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl |
|---|
eNotificationRequired, eNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.emf.ecore.EObject |
|---|
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset |
| Methods inherited from interface org.eclipse.emf.common.notify.Notifier |
|---|
eAdapters, eDeliver, eNotify, eSetDeliver |
| Methods inherited from interface org.eclipse.emf.ecore.InternalEObject |
|---|
eNotificationRequired |
| Field Detail |
|---|
public static final java.lang.String copyright
protected static final java.util.Map EXTENT_MAP_EDEFAULT
Extent Map' attribute.
getExtentMap()protected java.util.Map extentMap
Extent Map' attribute.
getExtentMap()protected OCLExpression expression
Expression' reference.
getExpression()| Constructor Detail |
|---|
protected QueryImpl()
protected QueryImpl(java.lang.String qs)
throws ParserException
qs - the query string
ParserException - in case of a parser error
protected QueryImpl(OCLExpression expr)
throws SemanticException
OCLExpression (constraint or query).
The query is validated according to OCL well-formedness rules.
expr - the ocl expression
SemanticException - in case of well-formedness problems| Method Detail |
|---|
protected org.eclipse.emf.ecore.EClass eStaticClass()
eStaticClass in class org.eclipse.emf.ecore.impl.EObjectImplpublic java.util.Map getExtentMap()
getExtentMap in interface QueryEClassifier) to their extents
(List)Query.setExtentMap(Map)public void setExtentMap(java.util.Map newExtentMap)
setExtentMap in interface QuerynewExtentMap - a map of classifiers (EClassifier) to their
extents (List)Query.getExtentMap()public OCLExpression getExpression()
getExpression in interface QueryQueryPackage.getQuery_Expression()public OCLExpression basicGetExpression()
public java.lang.Object evaluate(java.lang.Object obj)
Query
evaluate in interface Queryobj - an Object
EObjects, Java objects, a mixture, or even null.
In any case, the results conform to the expression's
result typeQuery.evaluate(),
Query.evaluate(List),
Query.resultType()public java.lang.Object evaluate()
QueryallInstances()
exclusively for evaluation.
evaluate in interface QueryEObjects, Java objects, a mixture, or even null.
In any case, the results conform to the expression's
result typeQuery.resultType()public boolean check(java.lang.Object obj)
Query
check in interface Querytrue or false according to
whether the constraint is metQuery.check(List)public java.util.List evaluate(java.util.List objList)
Query
evaluate in interface Queryobjects. Note that result elements may, themselves,
be collections of multiple results for a single input object.
In any case, the results conform to the expression's
result type#evaluate(EObject),
Query.resultType()public boolean check(java.util.List objList)
Query
check in interface QueryobjList - a list of objects to evaluate the constraint on
true if all of the objects satisfy
the constraint (including the trivial case of an empty input list);
false, otherwise#check(EObject)public java.util.List select(java.util.List objList)
Query
select in interface Queryobjects that
satisfy the constraintpublic java.util.List reject(java.util.List objList)
Query
reject in interface Queryobjects that
do not satisfy the constraintpublic org.eclipse.emf.ecore.EClassifier resultType()
QueryEClassifier in the user metamodel, or it may represent a core
Java language type (such as Boolean in the case of constraints)
or an OCL data type.
resultType in interface Querypublic java.lang.String queryText()
Query
queryText in interface Query
public java.lang.Object eGet(int featureID,
boolean resolve,
boolean coreType)
eGet in interface org.eclipse.emf.ecore.InternalEObjecteGet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
public void eSet(int featureID,
java.lang.Object newValue)
eSet in interface org.eclipse.emf.ecore.InternalEObjecteSet in class org.eclipse.emf.ecore.impl.BasicEObjectImplpublic void eUnset(int featureID)
eUnset in interface org.eclipse.emf.ecore.InternalEObjecteUnset in class org.eclipse.emf.ecore.impl.BasicEObjectImplpublic boolean eIsSet(int featureID)
eIsSet in interface org.eclipse.emf.ecore.InternalEObjecteIsSet in class org.eclipse.emf.ecore.impl.BasicEObjectImplprotected void validate()
public void setEvaluationEnvironment(EvaluationEnvironment env)
Query
setEvaluationEnvironment in interface Queryenv - my environmentpublic EvaluationEnvironment getEvaluationEnvironment()
Query
getEvaluationEnvironment in interface Querypublic java.lang.String toString()
toString in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
|
Copyright 2002, 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||