本文整理汇总了Java中org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package.eINSTANCE方法的典型用法代码示例。如果您正苦于以下问题:Java Ifc2x3tc1Package.eINSTANCE方法的具体用法?Java Ifc2x3tc1Package.eINSTANCE怎么用?Java Ifc2x3tc1Package.eINSTANCE使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package
的用法示例。
在下文中一共展示了Ifc2x3tc1Package.eINSTANCE方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: change
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
@Override
public void change(Database database, DatabaseSession databaseSession) throws BimserverDatabaseException {
boolean transactional = !(ePackage == Ifc2x3tc1Package.eINSTANCE || ePackage == Ifc4Package.eINSTANCE || ePackage == GeometryPackage.eINSTANCE);
LOGGER.info("Creating " + eClasses.size() + " " + (transactional ? "transactional" : "non transactional") + " tables for package " + ePackage.getName());
for (EClass eClass : eClasses) {
String tableName = eClass.getEPackage().getName() + "_" + eClass.getName();
if (eClass.getEAnnotation("nodatabase") == null) {
try {
boolean created = database.createTable(eClass, databaseSession, transactional);
if (!created) {
throw new BimserverDatabaseException("Could not create table " + tableName);
}
// for (EStructuralFeature eStructuralFeature : eClass.getEAllStructuralFeatures()) {
// if (eStructuralFeature.getEAnnotation("index") != null) {
// database.createIndexTable(eClass, eStructuralFeature, databaseSession);
// }
// }
} catch (BimserverLockConflictException e) {
LOGGER.error("", e);
}
}
}
}
示例2: change
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
@Override
public void change(Database database, DatabaseSession databaseSession) throws BimserverDatabaseException {
String tableName = getEClass().getEPackage().getName() + "_" + getEClass().getName();
if (eClass.getEAnnotation("nodatabase") == null) {
boolean transactional = !(eClass.getEPackage() == Ifc2x3tc1Package.eINSTANCE || eClass.getEPackage() == Ifc4Package.eINSTANCE || eClass.getEPackage() == GeometryPackage.eINSTANCE);
LOGGER.info("Creating " + (transactional ? "transactional" : "non transactional") + " table: " + tableName);
try {
boolean created = database.createTable(getEClass(), databaseSession, transactional);
if (!created) {
throw new BimserverDatabaseException("Could not create table " + tableName);
}
// for (EStructuralFeature eStructuralFeature : eClass.getEAllStructuralFeatures()) {
// if (eStructuralFeature.getEAnnotation("index") != null) {
// database.createIndexTable(eClass, eStructuralFeature, databaseSession);
// }
// }
} catch (BimserverLockConflictException e) {
LOGGER.error("", e);
}
}
}
示例3: initInternalStructure
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
public void initInternalStructure(DatabaseSession databaseSession) throws BimserverLockConflictException, BimserverDatabaseException {
RecordIterator recordIterator = keyValueStore.getRecordIterator(CLASS_LOOKUP_TABLE, databaseSession);
try {
Record record = recordIterator.next();
while (record != null) {
String packageAndClassName = BinUtils.byteArrayToString(record.getValue());
String packageName = packageAndClassName.substring(0, packageAndClassName.indexOf("_"));
String className = packageAndClassName.substring(packageAndClassName.indexOf("_") + 1);
EClass eClass = (EClass) getEClassifier(packageName, className);
// TODO geometry?
boolean transactional = !(eClass.getEPackage() == Ifc2x3tc1Package.eINSTANCE || eClass.getEPackage() == Ifc4Package.eINSTANCE);
keyValueStore.openTable(databaseSession, packageAndClassName, transactional);
for (EStructuralFeature eStructuralFeature : eClass.getEAllStructuralFeatures()) {
if (eStructuralFeature.getEAnnotation("singleindex") != null) {
String indexTableName = eClass.getEPackage().getName() + "_" + eClass.getName() + "_" + eStructuralFeature.getName();
try {
keyValueStore.openIndexTable(databaseSession, indexTableName, transactional);
} catch (DatabaseNotFoundException e) {
}
}
}
Short cid = BinUtils.byteArrayToShort(record.getKey());
cidToEclass[cid] = eClass;
eClassToCid.put(eClass, cid);
record = recordIterator.next();
}
} finally {
recordIterator.close();
}
}
示例4: getMap
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
public BiMap<IdEObject, Long> getMap(IdEObject idEObject) {
if (idEObject.eClass().getEPackage() == Ifc2x3tc1Package.eINSTANCE || idEObject.eClass().getEPackage() == Ifc4Package.eINSTANCE) {
return objectsToCommitFirst;
} else {
return objectsToCommitSecond;
}
}
示例5: convert
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
public void convert() throws SchemaConverterException, IfcModelInterfaceException {
if (getSource().getPackageMetaData().getEPackage() != Ifc2x3tc1Package.eINSTANCE) {
throw new SchemaConverterException("Source model should be Ifc2x3tc1");
}
if (getTarget().getPackageMetaData().getEPackage() != Ifc4Package.eINSTANCE) {
throw new SchemaConverterException("Target model should be Ifc4");
}
for (IdEObject idEObject : getSource().getValues()) {
copy(idEObject);
}
}
示例6: convert
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
public void convert() throws SchemaConverterException, IfcModelInterfaceException {
if (getSource().getPackageMetaData().getEPackage() != Ifc4Package.eINSTANCE) {
throw new SchemaConverterException("Source model should be Ifc4");
}
if (getTarget().getPackageMetaData().getEPackage() != Ifc2x3tc1Package.eINSTANCE) {
throw new SchemaConverterException("Target model should be Ifc2x3tc1");
}
for (IdEObject idEObject : getSource().getValues()) {
copy(idEObject);
}
}
示例7: init
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link GeometryPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @generated
*/
public static GeometryPackage init() {
if (isInited)
return (GeometryPackage) EPackage.Registry.INSTANCE.getEPackage(GeometryPackage.eNS_URI);
// Obtain or create and register package
GeometryPackageImpl theGeometryPackage = (GeometryPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof GeometryPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new GeometryPackageImpl());
isInited = true;
// Obtain or create and register interdependencies
Ifc2x3tc1PackageImpl theIfc2x3tc1Package = (Ifc2x3tc1PackageImpl) (EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) instanceof Ifc2x3tc1PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
: Ifc2x3tc1Package.eINSTANCE);
Ifc4PackageImpl theIfc4Package = (Ifc4PackageImpl) (EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) instanceof Ifc4PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) : Ifc4Package.eINSTANCE);
LogPackageImpl theLogPackage = (LogPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI) instanceof LogPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI) : LogPackage.eINSTANCE);
StorePackageImpl theStorePackage = (StorePackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI) instanceof StorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI)
: StorePackage.eINSTANCE);
// Load packages
theGeometryPackage.loadPackage();
theIfc2x3tc1Package.loadPackage();
theIfc4Package.loadPackage();
theLogPackage.loadPackage();
theStorePackage.loadPackage();
// Fix loaded packages
theGeometryPackage.fixPackageContents();
theIfc2x3tc1Package.fixPackageContents();
theIfc4Package.fixPackageContents();
theLogPackage.fixPackageContents();
theStorePackage.fixPackageContents();
// Mark meta-data to indicate it can't be changed
theGeometryPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(GeometryPackage.eNS_URI, theGeometryPackage);
return theGeometryPackage;
}
示例8: init
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link Ifc4Package#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @generated
*/
public static Ifc4Package init() {
if (isInited)
return (Ifc4Package) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI);
// Obtain or create and register package
Ifc4PackageImpl theIfc4Package = (Ifc4PackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof Ifc4PackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new Ifc4PackageImpl());
isInited = true;
// Obtain or create and register interdependencies
GeometryPackageImpl theGeometryPackage = (GeometryPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(GeometryPackage.eNS_URI) instanceof GeometryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GeometryPackage.eNS_URI)
: GeometryPackage.eINSTANCE);
Ifc2x3tc1PackageImpl theIfc2x3tc1Package = (Ifc2x3tc1PackageImpl) (EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) instanceof Ifc2x3tc1PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
: Ifc2x3tc1Package.eINSTANCE);
LogPackageImpl theLogPackage = (LogPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI) instanceof LogPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI) : LogPackage.eINSTANCE);
StorePackageImpl theStorePackage = (StorePackageImpl) (EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI) instanceof StorePackageImpl ? EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI)
: StorePackage.eINSTANCE);
// Load packages
theIfc4Package.loadPackage();
theGeometryPackage.loadPackage();
theIfc2x3tc1Package.loadPackage();
theLogPackage.loadPackage();
theStorePackage.loadPackage();
// Fix loaded packages
theIfc4Package.fixPackageContents();
theGeometryPackage.fixPackageContents();
theIfc2x3tc1Package.fixPackageContents();
theLogPackage.fixPackageContents();
theStorePackage.fixPackageContents();
// Mark meta-data to indicate it can't be changed
theIfc4Package.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(Ifc4Package.eNS_URI, theIfc4Package);
return theIfc4Package;
}
示例9: init
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link StorePackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @generated
*/
public static StorePackage init() {
if (isInited)
return (StorePackage) EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI);
// Obtain or create and register package
StorePackageImpl theStorePackage = (StorePackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof StorePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new StorePackageImpl());
isInited = true;
// Obtain or create and register interdependencies
GeometryPackageImpl theGeometryPackage = (GeometryPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(GeometryPackage.eNS_URI) instanceof GeometryPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(GeometryPackage.eNS_URI)
: GeometryPackage.eINSTANCE);
Ifc2x3tc1PackageImpl theIfc2x3tc1Package = (Ifc2x3tc1PackageImpl) (EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) instanceof Ifc2x3tc1PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
: Ifc2x3tc1Package.eINSTANCE);
Ifc4PackageImpl theIfc4Package = (Ifc4PackageImpl) (EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) instanceof Ifc4PackageImpl ? EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) : Ifc4Package.eINSTANCE);
LogPackageImpl theLogPackage = (LogPackageImpl) (EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI) instanceof LogPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI) : LogPackage.eINSTANCE);
// Load packages
theStorePackage.loadPackage();
theGeometryPackage.loadPackage();
theIfc2x3tc1Package.loadPackage();
theIfc4Package.loadPackage();
theLogPackage.loadPackage();
// Fix loaded packages
theStorePackage.fixPackageContents();
theGeometryPackage.fixPackageContents();
theIfc2x3tc1Package.fixPackageContents();
theIfc4Package.fixPackageContents();
theLogPackage.fixPackageContents();
// Mark meta-data to indicate it can't be changed
theStorePackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(StorePackage.eNS_URI, theStorePackage);
return theStorePackage;
}
示例10: perRecordVersioning
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
public static boolean perRecordVersioning(EClass eClass) {
return eClass.getEPackage() != Ifc2x3tc1Package.eINSTANCE && eClass.getEPackage() != Ifc4Package.eINSTANCE && eClass.getEPackage() != GeometryPackage.eINSTANCE;
}
示例11: init
import org.bimserver.models.ifc2x3tc1.Ifc2x3tc1Package; //导入方法依赖的package包/类
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link LogPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @generated
*/
public static LogPackage init() {
if (isInited)
return (LogPackage) EPackage.Registry.INSTANCE.getEPackage(LogPackage.eNS_URI);
// Obtain or create and register package
LogPackageImpl theLogPackage = (LogPackageImpl) (EPackage.Registry.INSTANCE
.get(eNS_URI) instanceof LogPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
: new LogPackageImpl());
isInited = true;
// Obtain or create and register interdependencies
GeometryPackageImpl theGeometryPackage = (GeometryPackageImpl) (EPackage.Registry.INSTANCE
.getEPackage(GeometryPackage.eNS_URI) instanceof GeometryPackageImpl
? EPackage.Registry.INSTANCE.getEPackage(GeometryPackage.eNS_URI) : GeometryPackage.eINSTANCE);
Ifc2x3tc1PackageImpl theIfc2x3tc1Package = (Ifc2x3tc1PackageImpl) (EPackage.Registry.INSTANCE
.getEPackage(Ifc2x3tc1Package.eNS_URI) instanceof Ifc2x3tc1PackageImpl
? EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
: Ifc2x3tc1Package.eINSTANCE);
Ifc4PackageImpl theIfc4Package = (Ifc4PackageImpl) (EPackage.Registry.INSTANCE
.getEPackage(Ifc4Package.eNS_URI) instanceof Ifc4PackageImpl
? EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) : Ifc4Package.eINSTANCE);
StorePackageImpl theStorePackage = (StorePackageImpl) (EPackage.Registry.INSTANCE
.getEPackage(StorePackage.eNS_URI) instanceof StorePackageImpl
? EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI) : StorePackage.eINSTANCE);
// Load packages
theLogPackage.loadPackage();
theGeometryPackage.loadPackage();
theIfc2x3tc1Package.loadPackage();
theIfc4Package.loadPackage();
theStorePackage.loadPackage();
// Fix loaded packages
theLogPackage.fixPackageContents();
theGeometryPackage.fixPackageContents();
theIfc2x3tc1Package.fixPackageContents();
theIfc4Package.fixPackageContents();
theStorePackage.fixPackageContents();
// Mark meta-data to indicate it can't be changed
theLogPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(LogPackage.eNS_URI, theLogPackage);
return theLogPackage;
}