Package org.eclipse.emf.ecore

Examples of org.eclipse.emf.ecore.EClassifier


  }

  public static Object getSetValue(Property property, BigDecimal value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }

    String name = eType.getInstanceClassName();
    if (name == "java.math.BigDecimal")
    {
      return value;
    }
View Full Code Here


  }

  public static Object getSetValue(Property property, BigInteger value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }

    String name = eType.getInstanceClassName();
    if (name == "java.math.BigInteger")
    {
      return value;
    }
View Full Code Here

  }

  public static Object getSetValue(Property property, byte[] value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }

    String name = eType.getInstanceClassName();
    if (name == "byte[]")
    {
      return value;
    }
View Full Code Here

  }

  public static Object getSetValue(Property property, Date value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }

    String name = eType.getInstanceClassName();
       
    if (name == "java.lang.String")
    {
      String typeName = getDateTypeName((EDataType)eType);
      if ("DateTime".equals(typeName)) {
View Full Code Here

  }

  public static Object getSetValue(Property property, String value)
  {
    EStructuralFeature eStructuralFeature = (EStructuralFeature)property;
    EClassifier eType = eStructuralFeature.getEType();
    if (value == null)
    {
      return eType.getDefaultValue();
    }

    String name = eType.getInstanceClassName();
    if (name == "java.lang.String")
    {
      return value;
    }
View Full Code Here

        Property declaration = changeSummaryElementNS == null
                             ? rootObject.getType().getProperty(changeSummaryElementName)
                             : xsdHelper.getGlobalProperty(changeSummaryElementNS, changeSummaryElementName, true);
        if (declaration != null)
        {
            EClassifier type = changeDescription.eClass();
            if (type != declaration.getType() && type != CHANGE_SUMMARY)
                writeGlobalAttribute(ExtendedMetaData.XSI_PREFIX, ExtendedMetaData.XSI_URI, XMLResource.TYPE, new StringBuffer(prefix(extendedMetaData.getNamespace(type), null))
                        .append(':').append(extendedMetaData.getName(type)).toString());
        }
       
View Full Code Here

  {
    ExtendedMetaData extendedMetaData = getExtendedMetaData();
    EPackage ePackage = extendedMetaData.getPackage(namespaceURI);
    if (ePackage != null)
    {
      EClassifier eClassifier = ePackage.getEClassifier(typeName);
      if (eClassifier == null)
      {
        eClassifier = extendedMetaData.getType(ePackage, typeName);
      }
      return eClassifier;
View Full Code Here

            upperBound = -1;
          }
        }
      }
 
      EClassifier referenceClassifier = getEClassifier(referenceType);
      EStructuralFeature result =
        createFeature
          (eClass,
           name,
           referenceClassifier,
View Full Code Here

        // if (types == null)
        // types = SDOUtil.getDataGraphTypes(dataGraph);

        Set/* EPackage */packages = new HashSet();
        for (final Iterator iterator = types.iterator(); iterator.hasNext();) {
            EClassifier type = (EClassifier)iterator.next();
            packages.add(type.getEPackage());
        }

        ResourceSet resourceSet = ((DataGraphImpl)dataGraph).getResourceSet();

        for (Iterator iterator = packages.iterator(); iterator.hasNext();) {
View Full Code Here

            ePackage.setName(packagePrefix);
            ePackage.setNsPrefix(packagePrefix);
            extendedMetaData.putPackage(uri, ePackage);
        }

        EClassifier eClassifier = ePackage.getEClassifier(name);
        if (eClassifier != null) // already defined?
        {
            // throw new IllegalArgumentException();
            return null;
        }

        if (name != null) {
            eClassifier =
                isDataType ? (EClassifier)SDOFactory.eINSTANCE.createDataType() : (EClassifier)SDOFactory.eINSTANCE
                    .createClass();
            eClassifier.setName(name);
        } else {
            eClassifier = DataObjectUtil.createDocumentRoot();
        }

        ePackage.getEClassifiers().add(eClassifier);
View Full Code Here

TOP

Related Classes of org.eclipse.emf.ecore.EClassifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.