Class CDOModelUtil

java.lang.Object
org.eclipse.emf.cdo.common.model.CDOModelUtil
All Implemented Interfaces:
CDOModelConstants

public final class CDOModelUtil extends Object implements CDOModelConstants
Various static helper methods for dealing with CDO meta models.
Since:
2.0
Author:
Eike Stepper
  • Method Details

    • isCorePackage

      public static boolean isCorePackage(EPackage ePackage)
      Since:
      2.0
    • isRoot

      public static boolean isRoot(EClass eClass)
      Since:
      2.0
    • isResourcePackage

      public static boolean isResourcePackage(EPackage ePackage)
      Since:
      2.0
    • isResource

      public static boolean isResource(EClass eClass)
      Since:
      2.0
    • isResourceFolder

      public static boolean isResourceFolder(EClass eClass)
      Since:
      2.0
    • isResourceNode

      public static boolean isResourceNode(EClass eClass)
      Since:
      2.0
    • isResourcePathFeature

      public static boolean isResourcePathFeature(EStructuralFeature eStructuralFeature)
      Since:
      4.3
    • isTypesPackage

      public static boolean isTypesPackage(EPackage ePackage)
      Since:
      4.0
    • isSystemPackage

      public static boolean isSystemPackage(EPackage ePackage)
      Since:
      2.0
    • isSystemPackageURI

      public static boolean isSystemPackageURI(String nsURI)
      Since:
      4.7
    • isBasedInPackage

      public static boolean isBasedInPackage(EClass eClass, String nsURI)
      Since:
      4.21
    • isLob

      public static boolean isLob(EClassifier eClassifier)
      Since:
      4.0
    • getType

      public static CDOType getType(EStructuralFeature feature)
      Since:
      2.0
    • getType

      public static CDOType getType(byte typeID)
      Since:
      4.0
    • getType

      public static CDOType getType(EClassifier classifier)
      Since:
      2.0
    • getCoreType

      public static CDOType getCoreType(EClassifier eDataType)
      Core types includes also complex data like EAnnotation, and EEnum
      Since:
      2.0
    • getPrimitiveType

      public static CDOType getPrimitiveType(Class<? extends Object> primitiveType)
      Since:
      2.0
    • getTypeOfObject

      public static CDOType getTypeOfObject(Object object)
      Since:
      4.0
    • getPackageInfo

      public static CDOPackageInfo getPackageInfo(Object value, CDOPackageRegistry packageRegistry)
      Since:
      2.0
    • getClassInfo

      public static CDOClassInfo getClassInfo(EClass eClass)
      Returns additional CDO infos for an EClass.

      This operation is somewhat expensive because it synchronizes on the EClass and iterates over all adapters. Whenever possible use CDORevision.getClassInfo() or InternalCDOObject.getClassInfo().

      Since:
      2.0
    • getAllPersistentFeatures

      @Deprecated public static EStructuralFeature[] getAllPersistentFeatures(EClass eClass)
      Deprecated.
      As of 4.2 use CDOModelUtil.getClassInfo(eClass).getAllPersistentFeatures().
      Returns all persistent features of an EClass.

      This operation is somewhat expensive because it synchronizes on the EClass and iterates over all adapters.

      Since:
      2.0
      See Also:
    • copyPackageUnit

      public static CDOPackageUnit copyPackageUnit(CDOPackageUnit packageUnit)
      Since:
      4.13
    • createPackageUnit

      public static CDOPackageUnit createPackageUnit()
      Since:
      2.0
    • createPackageInfo

      public static CDOPackageInfo createPackageInfo()
      Since:
      2.0
    • readPackage

      public static EPackage readPackage(org.eclipse.net4j.util.io.ExtendedDataInput in, ResourceSet resourceSet, boolean lookForResource) throws IOException
      Throws:
      IOException
      Since:
      3.0
    • writePackage

      public static void writePackage(org.eclipse.net4j.util.io.ExtendedDataOutput out, EPackage ePackage, boolean zipped, EPackage.Registry packageRegistry) throws IOException
      Throws:
      IOException
      Since:
      2.0
    • checkCrossResourceURIs

      public static void checkCrossResourceURIs(EPackage ePackage)
      Since:
      3.0
    • checkNoFeatureMaps

      public static void checkNoFeatureMaps(StringBuilder builder, EPackage ePackage, boolean checkFeatureMapEntries)
      Since:
      4.10
    • checkNoFeatureMaps

      public static void checkNoFeatureMaps(InternalCDOPackageUnit[] packageUnits, boolean checkFeatureMapEntries) throws CDOException
      Throws:
      CDOException
      Since:
      4.10
    • getSubTypes

      public static Map<EClass,List<EClass>> getSubTypes(EPackage.Registry packageRegistry)
      Since:
      4.0