org.eclipse.emf.ocl.query.impl
Class QueryFactoryImpl

java.lang.Object
  extended byorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended byorg.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended byorg.eclipse.emf.ecore.impl.EObjectImpl
              extended byorg.eclipse.emf.ecore.impl.FlatEObjectImpl
                  extended byorg.eclipse.emf.ecore.impl.EModelElementImpl
                      extended byorg.eclipse.emf.ecore.impl.EFactoryImpl
                          extended byorg.eclipse.emf.ocl.query.impl.QueryFactoryImpl
All Implemented Interfaces:
org.eclipse.emf.ecore.EFactory, org.eclipse.emf.ecore.EModelElement, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, org.eclipse.emf.common.notify.Notifier, QueryFactory

public class QueryFactoryImpl
extends org.eclipse.emf.ecore.impl.EFactoryImpl
implements QueryFactory

An implementation of the model Factory.


Nested Class Summary
 
Nested classes 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 inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList
 
Nested classes inherited from class org.eclipse.emf.ecore.InternalEObject
org.eclipse.emf.ecore.InternalEObject.EStore
 
Field Summary
static java.lang.String copyright
           
 
Fields inherited from class org.eclipse.emf.ecore.impl.EFactoryImpl
EDATE_FORMATS, ePackage
 
Fields inherited from class org.eclipse.emf.ecore.impl.EModelElementImpl
eAnnotations, EFROZEN, ELAST_EMODEL_ELEMENT_FLAG
 
Fields inherited from class org.eclipse.emf.ecore.impl.FlatEObjectImpl
eContents, eCrossReferences, eProxyURI
 
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.ocl.query.QueryFactory
eINSTANCE
 
Fields inherited from interface org.eclipse.emf.ecore.InternalEObject
EOPPOSITE_FEATURE_BASE
 
Constructor Summary
QueryFactoryImpl()
          Creates an instance of the factory
 
Method Summary
 java.lang.String convertToString(org.eclipse.emf.ecore.EDataType eDataType, java.lang.Object instanceValue)
           
 org.eclipse.emf.ecore.EObject create(org.eclipse.emf.ecore.EClass eClass)
           
 java.lang.Object createFromString(org.eclipse.emf.ecore.EDataType eDataType, java.lang.String initialValue)
           
 Query createQuery()
           
 Query createQuery(OCLExpression expr)
          Creates a query from an OCLExpression (constraint or query).
 Query createQuery(java.lang.String expr, org.eclipse.emf.ecore.EClassifier context)
          Creates an OCL query from the specified OCL expression string, for the given OCL classifier context.
static QueryPackage getPackage()
          Deprecated.  
 QueryPackage getQueryPackage()
           
static QueryFactory init()
          Creates the default factory implementation
 
Methods inherited from class org.eclipse.emf.ecore.impl.EFactoryImpl
basicCreate, basicSetEPackage, collapseWhiteSpace, eGet, eInverseAdd, eInverseRemove, eIsSet, eSet, eStaticClass, eUnset, getEPackage, replaceWhiteSpace, setEPackage
 
Methods inherited from class org.eclipse.emf.ecore.impl.EModelElementImpl
eObjectForURIFragmentSegment, eURIFragmentSegment, freeze, freeze, getEAnnotation, getEAnnotations, isFrozen, setFrozen
 
Methods inherited from class org.eclipse.emf.ecore.impl.FlatEObjectImpl
eContents, eCrossReferences, eIsProxy, eProperties, eProxyURI, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eSetClass, eSetDeliver
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, 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, eInverseRemove, eIsSet, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStore, eUnset, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues, toString
 
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.EFactory
getEPackage, setEPackage
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
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

copyright

public static final java.lang.String copyright

See Also:
Constant Field Values
Constructor Detail

QueryFactoryImpl

public QueryFactoryImpl()
Creates an instance of the factory.

Method Detail

init

public static QueryFactory init()
Creates the default factory implementation.


create

public org.eclipse.emf.ecore.EObject create(org.eclipse.emf.ecore.EClass eClass)

Specified by:
create in interface org.eclipse.emf.ecore.EFactory

createFromString

public java.lang.Object createFromString(org.eclipse.emf.ecore.EDataType eDataType,
                                         java.lang.String initialValue)

Specified by:
createFromString in interface org.eclipse.emf.ecore.EFactory

convertToString

public java.lang.String convertToString(org.eclipse.emf.ecore.EDataType eDataType,
                                        java.lang.Object instanceValue)

Specified by:
convertToString in interface org.eclipse.emf.ecore.EFactory

createQuery

public Query createQuery()

Specified by:
createQuery in interface QueryFactory
Returns:
a new object of class 'Query'.

createQuery

public Query createQuery(java.lang.String expr,
                         org.eclipse.emf.ecore.EClassifier context)
Description copied from interface: QueryFactory
Creates an OCL query from the specified OCL expression string, for the given OCL classifier context.

This method offers the convenience of creating the package and context declaration and other boilerplate components of the query on the caller's behalf; the specified expression must be only the bare expression without even the inv: keyword. e.g.,

     self.color <> Color::red
 
instead of:
     package com::examples::fruit
     context Pomegranate
     inv: self.color <> Color::red
     endpackage
 

Specified by:
createQuery in interface QueryFactory
Parameters:
expr - the bare OCL expression text
context - the OCL classifier context
Returns:
the compiled OCL query object

createQuery

public Query createQuery(OCLExpression expr)
Description copied from interface: QueryFactory
Creates a query from an OCLExpression (constraint or query). The query is validated according to OCL well-formedness rules.

Specified by:
createQuery in interface QueryFactory
Parameters:
expr - the ocl expression
Returns:
the new query instance, if the OCL expression is valid

getQueryPackage

public QueryPackage getQueryPackage()

Specified by:
getQueryPackage in interface QueryFactory
Returns:
the package supported by this factory.

getPackage

public static QueryPackage getPackage()
Deprecated.  


Copyright 2002, 2006 IBM Corporation and others.
All Rights Reserved.