Tabnine Logo
EStructuralFeature.getEContainingClass
Code IndexAdd Tabnine to your IDE (free)

How to use
getEContainingClass
method
in
org.eclipse.emf.ecore.EStructuralFeature

Best Java code snippets using org.eclipse.emf.ecore.EStructuralFeature.getEContainingClass (Showing top 20 results out of 315)

origin: opensourceBIM/BIMserver

@SuppressWarnings("unchecked")
public void addUseForSerialization(EStructuralFeature eStructuralFeature, int index) {
  if (eStructuralFeature.getEContainingClass().isSuperTypeOf(eClass)) {
    Set<Object> set = (Set<Object>) useForSerializationFeatures.get(eStructuralFeature);
    if (set == null) {
      set = new HashSet<>();
      useForSerializationFeatures.put(eStructuralFeature, set);
    }
    set.add(index);
  } else {
    throw new IllegalArgumentException(eStructuralFeature.getName() + " does not exist in " + eClass.getName());
  }
}
origin: opensourceBIM/BIMserver

public void addUseForSerialization(EStructuralFeature eStructuralFeature) {
  if (eStructuralFeature.getEContainingClass().isSuperTypeOf(eClass)) {
    useForSerializationFeatures.put(eStructuralFeature, true);
  } else {
    throw new IllegalArgumentException(eStructuralFeature.getName() + " does not exist in " + eClass.getName());
  }
}
 
origin: opensourceBIM/BIMserver

protected boolean isInverse(EStructuralFeature eStructuralFeature) throws ObjectIDMException {
  if (eStructuralFeature instanceof EReference && eStructuralFeature.getEContainingClass().getEAnnotation("wrapped") == null) {
    if (eStructuralFeature.getEAnnotation("hidden") == null && eStructuralFeature.getEContainingClass().getEAnnotation("hidden") == null) {
      EntityDefinition entityBN = packageMetaData.getSchemaDefinition().getEntityBN(eStructuralFeature.getEContainingClass().getName());
      if (entityBN == null) {
        throw new ObjectIDMException(eStructuralFeature.getEContainingClass().getName() + " not found");
      }
      Attribute attribute = entityBN.getAttributeBNWithSuper(eStructuralFeature.getName());
      return attribute instanceof InverseAttribute;
    } else {
      return false;
    }
  }
  return false;
}

origin: opensourceBIM/BIMserver

public List<ObjectIdentifier> getOids(EClass eClass, EStructuralFeature eStructuralFeature, Object value, DatabaseInterface databaseInterface, int pid, int rid) throws BimserverDatabaseException {
  if (eStructuralFeature.getEAnnotation("singleindex") != null) {
    List<ObjectIdentifier> result = new ArrayList<>();
    String indexTableName = eStructuralFeature.getEContainingClass().getEPackage().getName() + "_" + eClass.getName() + "_" + eStructuralFeature.getName();
    byte[] queryBytes = null;
    if (value instanceof String) {
origin: opensourceBIM/BIMserver

@Override
public void change(Database database, DatabaseSession databaseSession) throws NotImplementedException, BimserverDatabaseException {
  EClass eClass = eStructuralFeature.getEContainingClass();
  KeyValueStore keyValueStore = database.getKeyValueStore();
origin: opensourceBIM/BIMserver

int listSize = buffer.getInt();
if (listSize < 0) {
  throw new BimserverDatabaseException("Negative array size for " + feature.getEContainingClass().getName() + "." + feature.getName());
origin: opensourceBIM/BIMserver

public void updateNode(int expressId, EClass ec, VirtualObject eObject) throws DeserializeException, BimserverDatabaseException {
  for (WaitingVirtualObject waitingObject : waitingObjects.get(expressId)) {
    if (waitingObject.getStructuralFeature().isMany()) {
      ListWaitingVirtualObject listWaitingObject = (ListWaitingVirtualObject)waitingObject;
      if (((EClass) waitingObject.getStructuralFeature().getEType()).isSuperTypeOf(eObject.eClass())) {
        if (waitingObject instanceof TwoDimensionalListWaitingVirtualObject) {
          TwoDimensionalListWaitingVirtualObject twoDimensionalListWaitingVirtualObject = (TwoDimensionalListWaitingVirtualObject)waitingObject;
          ListCapableVirtualObject object2 = twoDimensionalListWaitingVirtualObject.getObject2();
          object2.setListItemReference(waitingObject.getStructuralFeature(), listWaitingObject.getIndex(), eObject.eClass(), eObject.getOid(), waitingObject.getBufferPosition());
        } else {
          waitingObject.getObject().setListItemReference(waitingObject.getStructuralFeature(), listWaitingObject.getIndex(), eObject.eClass(), eObject.getOid(), waitingObject.getBufferPosition());
        }
        decrementOpenConnections(waitingObject.getObject());
      } else {
        throw new DeserializeException(waitingObject.getLineNumber(), "Field " + waitingObject.getStructuralFeature().getName() + " of "
            + waitingObject.getStructuralFeature().getEContainingClass().getName() + " cannot contain a " + eObject.eClass().getName());
      }
    } else {
      if (((EClass) waitingObject.getStructuralFeature().getEType()).isSuperTypeOf(eObject.eClass())) {
        waitingObject.getObject().setReference(waitingObject.getStructuralFeature(), eObject.getOid(), waitingObject.getBufferPosition());
        decrementOpenConnections(waitingObject.getObject());
      } else {
        throw new DeserializeException(waitingObject.getLineNumber(), "Field " + waitingObject.getStructuralFeature().getName() + " of "
            + waitingObject.getStructuralFeature().getEContainingClass().getName() + " cannot contain a " + eObject.eClass().getName() + "/" + eObject.getOid());
      }
    }
  }
  waitingObjects.remove(expressId);
}
origin: org.eclipse.ocl/ecore

public static EClassifier getOwner(EStructuralFeature property) {
  EClass ownerClass = property.getEContainingClass();
  EClassifier result = ownerClass;
  
  if (ownerClass != null) {
    EClassifier shadowed = getRealClassifier(ownerClass);
    
    if (shadowed != null) {
      result = shadowed;
    }
  }
  
  return result;
}

origin: org.eclipse.emf.cdo.server/db

@Override
public String toString()
{
 Object mappedElement = field != null ? field : dbType;
 return MessageFormat
   .format(
     "{0}[{1}.{2} --> {3}]", getClass().getSimpleName(), feature.getEContainingClass().getName(), feature.getName(), mappedElement); //$NON-NLS-1$
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.e4.ui.workbench

private String getTopic(EStructuralFeature eFeature, String type) {
  EClass eContainingClass = eFeature.getEContainingClass();
  return UIEvents.UIModelTopicBase + UIEvents.TOPIC_SEP
      + eContainingClass.getEPackage().getName() + UIEvents.TOPIC_SEP
      + eContainingClass.getName() + UIEvents.TOPIC_SEP + eFeature.getName()
      + UIEvents.TOPIC_SEP + type;
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

/**
 * @since 2.6
 */
public static EStructuralFeature.Internal.SettingDelegate.Factory getSettingDelegateFactory(EStructuralFeature eStructuralFeature)
{
 for (String settingDelegate : getSettingDelegates(eStructuralFeature.getEContainingClass().getEPackage()))
 {
  if (eStructuralFeature.getEAnnotation(settingDelegate) != null)
   return EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.getFactory(settingDelegate);
 }
 return null;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

/**
 * @since 2.6
 */
public static EStructuralFeature.Internal.SettingDelegate.Factory getSettingDelegateFactory(EStructuralFeature eStructuralFeature)
{
 for (String settingDelegate : getSettingDelegates(eStructuralFeature.getEContainingClass().getEPackage()))
 {
  if (eStructuralFeature.getEAnnotation(settingDelegate) != null)
   return EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.getFactory(settingDelegate);
 }
 return null;
}
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

public boolean isConformToRelationSource(ReferenceType relationType, ClassType sourceType) {
  final EStructuralFeature featureType = relationType.getRefname();
  final EClassifier classifier = sourceType.getClassname();
  final EClass sourceClass = featureType.getEContainingClass();
  return isConform(sourceClass, classifier);
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

 @Override
 public String toString()
 {
  EStructuralFeature eStructuralFeature = getEStructuralFeature();
  String prefix = eStructuralFeature.getEContainingClass().getEPackage().getNsPrefix();
  eStructuralFeature.getName();
  return 
    (prefix != null && prefix.length() != 0 ? 
     prefix + ":" + eStructuralFeature.getName() : 
     eStructuralFeature.getName()) + 
     "=" + getValue();
 }
}
origin: org.eclipse.emf/org.eclipse.emf.codegen.ecore

protected GenFeature findGenFeature(EStructuralFeature eStructuralFeature)
{
 GenClass genClass = findGenClass(eStructuralFeature.getEContainingClass());
 for (GenFeature genFeature : genClass.getGenFeatures())
 {
  if (eStructuralFeature.getName().equals(genFeature.getEcoreFeature().getName())) //FB TBD different objects for ecore model!
  {
   return genFeature;
  }
 }
 return null;
}
origin: org.eclipse/org.eclipse.emf.codegen.ecore

protected GenFeature findGenFeature(EStructuralFeature eStructuralFeature)
{
 GenClass genClass = findGenClass(eStructuralFeature.getEContainingClass());
 for (GenFeature genFeature : genClass.getGenFeatures())
 {
  if (eStructuralFeature.getName().equals(genFeature.getEcoreFeature().getName())) //FB TBD different objects for ecore model!
  {
   return genFeature;
  }
 }
 return null;
}
origin: com.b2international.snowowl/org.eclipse.emf.cdo

/**
 * @since 3.0
 */
public static void cleanStaleReference(EObject eObject, EStructuralFeature eFeature)
{
 if (!eFeature.isMany() && eFeature.getEContainingClass() != null)
 {
  InternalCDOObject cdoObject = (InternalCDOObject)getCDOObject(eObject);
  cdoObject.eStore().unset(cdoObject, eFeature);
 }
}
origin: org.eclipse.incquery/org.eclipse.incquery.patternlanguage.emf

private IInputKey extractColumnDescriptor(final EStructuralFeature feature, int columnIndex) {
  if (0 == columnIndex) {
    return new EClassTransitiveInstancesKey(feature.getEContainingClass());
  } else {
    if (feature instanceof EReference) {
      return new EClassTransitiveInstancesKey(((EReference) feature).getEReferenceType());
    } else {
      return new EDataTypeInSlotsKey(((EAttribute) feature).getEAttributeType());
    }
  }
}
origin: org.eclipse/org.eclipse.emf.codegen.ecore

public boolean hasDelegateFeature()
{
 EStructuralFeature ecoreFeature = getEcoreFeature();
 EClass ecoreClass = ecoreFeature.getEContainingClass();
 EStructuralFeature mixedFeature = getExtendedMetaData().getMixedFeature(ecoreClass);
 return 
  (mixedFeature != null && mixedFeature != ecoreFeature && getExtendedMetaData().getFeatureKind(ecoreFeature) >= ExtendedMetaData.ELEMENT_FEATURE) ||
  getExtendedMetaData().getGroup(ecoreFeature) != null;
}
origin: opensourceBIM/BIMserver

    return Ifc2x3tc1Package.eINSTANCE.getIfcRelConnectsStructuralActivity_RelatingElement();
} else if (eStructuralFeature.getEContainingClass().getEPackage() == Ifc4Package.eINSTANCE) {
  if (eStructuralFeature == Ifc4Package.eINSTANCE.getIfcRelContainedInSpatialStructure_RelatedElements()) {
    if (Ifc4Package.eINSTANCE.getIfcElement().isSuperTypeOf(eClassOfOtherEnd)) {
org.eclipse.emf.ecoreEStructuralFeaturegetEContainingClass

Javadoc

Returns the value of the 'EContaining Class' container reference. It is bidirectional and its opposite is ' org.eclipse.emf.ecore.EClass#getEStructuralFeatures'.

It represents the containing class of this feature.

Popular methods of EStructuralFeature

  • getName
  • isMany
  • getEType
  • isUnsettable
    Returns the value of the 'Unsettable' attribute. An unsettable feature explicitly models the state o
  • isChangeable
    Returns the value of the 'Changeable' attribute. The default value is "true".
  • isDerived
    Returns the value of the 'Derived' attribute. A derived feature typically computes its value from th
  • isTransient
    Returns the value of the 'Transient' attribute.
  • getDefaultValue
    Returns the value of the 'Default Value' attribute. It represents the default value that feature mus
  • getUpperBound
  • getDefaultValueLiteral
    Returns the value of the 'Default Value Literal' attribute. It represents the serialized form of the
  • getEGenericType
  • isUnique
  • getEGenericType,
  • isUnique,
  • getFeatureID,
  • getEAnnotation,
  • getLowerBound,
  • isOrdered,
  • setChangeable,
  • eIsProxy,
  • setUpperBound

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getContentResolver (Context)
  • putExtra (Intent)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JButton (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now