addInstanceProperty((EModelElement)definedProperty, instanceProperty, value);
}
protected void addInstanceProperty(EModelElement metaObject, Property property, Object value) {
String uri = property.getContainingType().getURI();
EAnnotation eAnnotation = metaObject.getEAnnotation(uri);
if (eAnnotation == null) {
eAnnotation = EcoreFactory.eINSTANCE.createEAnnotation();
eAnnotation.setSource(uri);
metaObject.getEAnnotations().add(eAnnotation);
}
// TODO if (property.isMany()) ... // convert list of values
String stringValue = convertToString(property.getType(), value);
eAnnotation.getDetails().put(property.getName(), stringValue);
}