congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
EStructuralFeature.getUpperBound
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: opensourceBIM/BIMserver

Object eGet = eObject.eGet(eStructuralFeature);
if (eStructuralFeature instanceof EAttribute) {
  if (eStructuralFeature.getUpperBound() == 1) {
    out.println("<td>" + eGet + "</td>");
  } else {
  if (eStructuralFeature.getUpperBound() == 1) {
    if (eStructuralFeature.getEType().getEAnnotation("wrapped") != null) {
      EObject value = (EObject) eGet;
origin: opensourceBIM/BIMserver

@SuppressWarnings("unchecked")
public void sortAllAggregates(ObjectIDM objectIDM, IdEObject ifcRoot) {
  for (EStructuralFeature eStructuralFeature : ifcRoot.eClass().getEAllStructuralFeatures()) {
    if (objectIDM.shouldFollowReference(ifcRoot.eClass(), ifcRoot.eClass(), eStructuralFeature)) {
      if (eStructuralFeature.getUpperBound() == -1 || eStructuralFeature.getUpperBound() > 1) {
        if (eStructuralFeature.getEType() instanceof EClass) {
          if (eStructuralFeature.getEType().getEAnnotation("wrapped") != null) {
            EList<IdEObject> list = (EList<IdEObject>) ifcRoot.eGet(eStructuralFeature);
            sortPrimitiveList(list);
          } else {
            EList<IdEObject> list = (EList<IdEObject>) ifcRoot.eGet(eStructuralFeature);
            sortComplexList(objectIDM, ifcRoot.eClass(), list, eStructuralFeature);
          }
        }
      }
    }
  }
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

protected boolean shouldUnset(EStructuralFeature feature, Object value)
{
 if (feature.getUpperBound() != ETypedElement.UNSPECIFIED_MULTIPLICITY && !feature.isUnsettable())
 {
  Object defaultValue = feature.getDefaultValue();
  return defaultValue == null ? value == null : defaultValue.equals(value);
 }
 else
 {
  return false;
 }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

protected boolean shouldUnset(EStructuralFeature feature, Object value)
{
 if (feature.getUpperBound() != ETypedElement.UNSPECIFIED_MULTIPLICITY && !feature.isUnsettable())
 {
  Object defaultValue = feature.getDefaultValue();
  return defaultValue == null ? value == null : defaultValue.equals(value);
 }
 else
 {
  return false;
 }
}
origin: org.eclipse.epsilon/epsilon-hutn

/**
 * <!-- begin-user-doc -->
 * Indicates whether the contents of this Slot can fit in the
 * specified EStructuralFeature.
 * <!-- end-user-doc -->
 * @model
 * @generated NOT
 */
public boolean multiplicityCompatibleWith(EStructuralFeature feature) {
  return getNumberOfValues() >= feature.getLowerBound() &&
      getNumberOfValues() <= feature.getUpperBound();
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

else if (feature.getUpperBound() == ETypedElement.UNSPECIFIED_MULTIPLICITY)
    int affiliationUpperBound = affiliation.getUpperBound();
    return 
     (affiliationUpperBound > 1 || affiliationUpperBound == ETypedElement.UNBOUNDED_MULTIPLICITY) && 
origin: org.eclipse.emf/org.eclipse.emf.ecore

else if (feature.getUpperBound() == ETypedElement.UNSPECIFIED_MULTIPLICITY)
    int affiliationUpperBound = affiliation.getUpperBound();
    return 
     (affiliationUpperBound > 1 || affiliationUpperBound == ETypedElement.UNBOUNDED_MULTIPLICITY) && 
origin: org.eclipse.emf/org.eclipse.emf.ecore.change

protected EList<?> getListValue(EList<?> originalList)
{
 if (isSet() && getFeature().getUpperBound() != 1)
 {
  if (value instanceof EList<?>) // cached already?
  {
   return (EList<?>)value;
  }
  EList<Object> changedList =  new BasicEList<Object>(originalList);
  apply(changedList);
  value = changedList; // cache result
  return changedList;
 }
 return ECollections.EMPTY_ELIST;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

protected boolean shouldUnset(EStructuralFeature feature, Object value)
{
 // If the feature is unsettable, then regardless of the value, we should not be unsetting the feature.
 //
 if (feature.isUnsettable())
 {
  return false;
 }
 // If it's not an open content element, unset the feature if the value is the same as the default value.
 //
 else if (feature.getUpperBound() != ETypedElement.UNSPECIFIED_MULTIPLICITY)
 {
  Object defaultValue = feature.getDefaultValue();
  return defaultValue == null ? value == null : defaultValue.equals(value);
 }
 // If this is a feature of the document root itself, unset if the value is null.
 // If it was a nillable element, it would have been unsettable.
 //
 else if (feature.getEContainingClass() == owner.eClass())
 {
  return value == null;
 }
 // Otherwise, return false.
 //
 else
 {
  return false;
 }
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore.change

protected EList<?> getListValue(EList<?> originalList)
{
 if (isSet() && getFeature().getUpperBound() != 1)
 {
  if (value instanceof EList<?>) // cached already?
  {
   return (EList<?>)value;
  }
  EList<Object> changedList =  new BasicEList<Object>(originalList);
  apply(changedList);
  value = changedList; // cache result
  return changedList;
 }
 return ECollections.EMPTY_ELIST;
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

protected boolean shouldUnset(EStructuralFeature feature, Object value)
{
 // If the feature is unsettable, then regardless of the value, we should not be unsetting the feature.
 //
 if (feature.isUnsettable())
 {
  return false;
 }
 // If it's not an open content element, unset the feature if the value is the same as the default value.
 //
 else if (feature.getUpperBound() != ETypedElement.UNSPECIFIED_MULTIPLICITY)
 {
  Object defaultValue = feature.getDefaultValue();
  return defaultValue == null ? value == null : defaultValue.equals(value);
 }
 // If this is a feature of the document root itself, unset if the value is null.
 // If it was a nillable element, it would have been unsettable.
 //
 else if (feature.getEContainingClass() == owner.eClass())
 {
  return value == null;
 }
 // Otherwise, return false.
 //
 else
 {
  return false;
 }
}
origin: org.eclipse/org.eclipse.xsd

protected XSDParticle buildModelGroupParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
{
 XSDModelGroup xsdModelGroup = findOrCreateModelGroup(xsdComplexTypeDefinition);
 XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup();
 modelGroup.setCompositor(XSDCompositor.CHOICE_LITERAL);
 XSDParticle xsdParticle = XSDFactory.eINSTANCE.createXSDParticle();
 xsdParticle.setContent(modelGroup);
 if (eStructuralFeature.getUpperBound() != 1)
 {
  xsdParticle.setMaxOccurs(eStructuralFeature.getUpperBound());
 }
 xsdModelGroup.getContents().add(xsdParticle);
 map(xsdParticle, eStructuralFeature);
 createEcoreAnnotation(xsdParticle, "featureMap", eStructuralFeature.getName());
 buildAnnotations(xsdModelGroup, eStructuralFeature);
 return xsdParticle;
}
origin: org.eclipse.xsd/org.eclipse.xsd

protected XSDParticle buildModelGroupParticle(XSDComplexTypeDefinition xsdComplexTypeDefinition, EStructuralFeature eStructuralFeature)
{
 XSDModelGroup xsdModelGroup = findOrCreateModelGroup(xsdComplexTypeDefinition);
 XSDModelGroup modelGroup = XSDFactory.eINSTANCE.createXSDModelGroup();
 modelGroup.setCompositor(XSDCompositor.CHOICE_LITERAL);
 XSDParticle xsdParticle = XSDFactory.eINSTANCE.createXSDParticle();
 xsdParticle.setContent(modelGroup);
 if (eStructuralFeature.getUpperBound() != 1)
 {
  xsdParticle.setMaxOccurs(eStructuralFeature.getUpperBound());
 }
 xsdModelGroup.getContents().add(xsdParticle);
 map(xsdParticle, eStructuralFeature);
 createEcoreAnnotation(xsdParticle, "featureMap", eStructuralFeature.getName());
 buildAnnotations(xsdModelGroup, eStructuralFeature);
 return xsdParticle;
}
origin: org.eclipse.emf/org.eclipse.emf.ecore

int upperBound = feature.getUpperBound();
if (upperBound > 0 && size > upperBound)
origin: org.eclipse.net4j.util/defs

if (referencedObject != null)
 if (structuralFeature.getUpperBound() != -1)
origin: org.eclipse.xsd/org.eclipse.xsd

if (eStructuralFeature.getUpperBound() != 1)
 xsdParticle.setMaxOccurs(eStructuralFeature.getUpperBound());
origin: org.eclipse.emf/org.eclipse.emf.ecore.change

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public Object getValue()
{
 EStructuralFeature feature = getFeature();
 if (feature.getUpperBound() != 1)
 {
  if (value == null && eContainer() instanceof EObjectToChangesMapEntryImpl)
  {
   value = getListValue((EList<?>)((EObjectToChangesMapEntryImpl)eContainer()).getTypedKey().eGet(feature));
  }
 }
 else if (feature instanceof EReference)
 {
  return getReferenceValue();
 }
 else if (value == null) // feature is instance of EAttribute
 {
  EDataType type = (EDataType)feature.getEType();
  value = EcoreUtil.createFromString(type, valueString);
 }
 return value;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore.change

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public Object getValue()
{
 EStructuralFeature feature = getFeature();
 if (feature.getUpperBound() != 1)
 {
  if (value == null && eContainer() instanceof EObjectToChangesMapEntryImpl)
  {
   value = getListValue((EList<?>)((EObjectToChangesMapEntryImpl)eContainer()).getTypedKey().eGet(feature));
  }
 }
 else if (feature instanceof EReference)
 {
  return getReferenceValue();
 }
 else if (value == null) // feature is instance of EAttribute
 {
  EDataType type = (EDataType)feature.getEType();
  value = EcoreUtil.createFromString(type, valueString);
 }
 return value;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

int upperBound = openFeature.getUpperBound();
if (upperBound > 1 || upperBound == ETypedElement.UNBOUNDED_MULTIPLICITY)
origin: org.eclipse.emf/org.eclipse.emf.ecore

int upperBound = openFeature.getUpperBound();
if (upperBound > 1 || upperBound == ETypedElement.UNBOUNDED_MULTIPLICITY)
org.eclipse.emf.ecoreEStructuralFeaturegetUpperBound

Popular methods of EStructuralFeature

  • getName
  • isMany
  • getEType
  • getEContainingClass
    Returns the value of the 'EContaining Class' container reference. It is bidirectional and its opposi
  • 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
  • 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

  • Finding current android device location
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • ImageIO (javax.imageio)
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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