private void addSimpleTypes() { Iterator<DefinedType> typeIter = schema.getTypes().iterator(); while (typeIter.hasNext()) { DefinedType type = typeIter.next(); if (type.getDomain() instanceof SimpleType) { EClass testType = getOrCreateEClass(type.getName()); testType.getEAnnotations().add(createWrappedAnnotation()); modifySimpleType(type, testType); } } }
type2.setDomain(new IntegerType()); modifySimpleType(type2, testType); testType.getEAnnotations().add(createWrappedAnnotation()); } else if (type.getDomain() instanceof DefinedType) { if (schemaPack.getEClassifier(type.getName()) != null) { testType.getESuperTypes().add((EClass) classifier); if (classifier.getEAnnotation("wrapped") != null) { testType.getEAnnotations().add(createWrappedAnnotation());
ifcComplexNumber.getEStructuralFeature("wrappedValueAsString").setUpperBound(2); attribute.setUpperBound(2); ifcComplexNumber.getEAnnotations().add(createWrappedAnnotation()); } else if (type.getName().equals("IfcNullStyle")) { wrappedValue.setName("wrappedValue"); wrappedValue.setEType(ifcNullStyleEnum); ifcNullStyleWrapper.getEAnnotations().add(createWrappedAnnotation()); ifcNullStyleWrapper.getEStructuralFeatures().add(wrappedValue); } else if (type.getName().equals("IfcLineIndex")) { attribute.setLowerBound(2); attribute.setUpperBound(-1); ifcLineIndex.getEAnnotations().add(createWrappedAnnotation()); } else if (type.getName().equals("IfcArcIndex")) { EClass ifcArcIndex = getOrCreateEClass(type.getName()); attribute.setUpperBound(3); attribute.setLowerBound(3); ifcArcIndex.getEAnnotations().add(createWrappedAnnotation());
revisionBoundsUntransformedMm.getEAnnotations().add(createHiddenAnnotation()); vector3f.getEAnnotations().add(createHiddenAnnotation()); geometryInfo.getEAnnotations().add(createHiddenAnnotation()); schema.createEAttribute(geometryInfo, "startVertex", EcorePackage.eINSTANCE.getEIntegerObject()); schema.createEAttribute(geometryInfo, "startIndex", EcorePackage.eINSTANCE.getEIntegerObject());
/** * Creates the shadow class to contain features that an Ecore classifier * cannot contain for itself. * * @param classifier an Ecore classifier * * @return the class containing its features */ public static EClass createShadowClass(EClassifier classifier) { // the features may have invalid characters in their names EClass result = org.eclipse.emf.ecore.EcoreFactory.eINSTANCE.createEClass(); result.setName(classifier.getName() + "_Class"); //$NON-NLS-1$ EAnnotation ann = org.eclipse.emf.ecore.EcoreFactory.eINSTANCE.createEAnnotation(); ann.setSource(Environment.OCL_NAMESPACE_URI); ann.getReferences().add(classifier); result.getEAnnotations().add(ann); return result; }
profileDescriptor.getEAnnotations().add(createNoDatabaseAnnotation()); schema.createEAttribute(profileDescriptor, "name", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); schema.createEAttribute(profileDescriptor, "description", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); serviceDescriptor.getEAnnotations().add(createNoDatabaseAnnotation()); schema.createEAttribute(serviceDescriptor, "name", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); schema.createEAttribute(serviceDescriptor, "url", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); serviceInterface.getEAnnotations().add(createNoDatabaseAnnotation()); schema.createEAttribute(serviceInterface, "name", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); schema.createEAttribute(serviceInterface, "nameSpace", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); serviceMethod.getEAnnotations().add(createNoDatabaseAnnotation()); schema.createEAttribute(serviceMethod, "name", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); schema.createEAttribute(serviceMethod, "doc", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); serviceField.getEAnnotations().add(createNoDatabaseAnnotation()); EClass serviceType = schema.createEClass("store", "ServiceType"); serviceParameter.getEAnnotations().add(createNoDatabaseAnnotation()); schema.createEAttribute(serviceParameter, "name", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); schema.createEAttribute(serviceParameter, "doc", EcorePackage.eINSTANCE.getEString(), Multiplicity.SINGLE); typeDefinition.getEAnnotations().add(createNoDatabaseAnnotation()); EClass objectDefinition = schema.createEClass("store", "ObjectDefinition", typeDefinition); objectDefinition.getEAnnotations().add(createNoDatabaseAnnotation()); EClass primitiveDefinition = schema.createEClass("store", "PrimitiveDefinition", typeDefinition); primitiveDefinition.getEAnnotations().add(createNoDatabaseAnnotation()); EClass arrayDefinition = schema.createEClass("store", "ArrayDefinition", typeDefinition);