((EClassifier)type).setInstanceClassName(javaClassName);
}
public static Property createProperty(Type containingType, String name, Type propertyType)
{
EStructuralFeature eStructuralFeature =
propertyType.isDataType() ?
(EStructuralFeature)SDOFactory.eINSTANCE.createAttribute() :
(EStructuralFeature)SDOFactory.eINSTANCE.createReference();
eStructuralFeature.setName(name);
eStructuralFeature.setEType((EClassifier)propertyType);
((EClass)containingType).getEStructuralFeatures().add(eStructuralFeature);
//if (containingType.getName() == null)
if ("".equals(ExtendedMetaData.INSTANCE.getName((EClass)containingType))) // DocumentRoot containingType?
{
//FB TBD ... figure out how to decide whether to use ELEMENT_FEATURE or ATTRIBUTE_FEATURE
ExtendedMetaData.INSTANCE.setFeatureKind(eStructuralFeature, ExtendedMetaData.ELEMENT_FEATURE);
ExtendedMetaData.INSTANCE.setNamespace(eStructuralFeature, containingType.getURI());
//FB???eStructuralFeature.setUnique(false);
//FB???eStructuralFeature.setUpperBound(ETypedElement.UNSPECIFIED_MULTIPLICITY);
}
if (containingType.isSequenced()) {
eStructuralFeature.setDerived(true);
eStructuralFeature.setTransient(true);
eStructuralFeature.setVolatile(true);
}
return (Property)eStructuralFeature;
}