/**
* Add all (local) attributes in the source class to the target EMFClass.
*/
private void parseAttributes(ModeldocFactory factory, EClass source, EMFClass target) {
for (EAttribute a : source.getEAttributes()) {
EMFAttribute created = factory.createEMFAttribute();
created.setName(a.getName());
created.setId(a.isID());
created.setLowerBound(a.getLowerBound());
created.setUpperBound(a.getUpperBound());
created.setType(a.getEAttributeType().getName());
created.setDefaultLiteral(a.getDefaultValueLiteral());
// add tagline
JavadocTagElement e = getTaglineForEMFElement(factory, a);
if (e != null) {
created.setTagline(e);
}
// is it an enumeration? populate list of accepted literals
if (a.getEAttributeType() instanceof EEnum) {
EEnum en = (EEnum) a.getEAttributeType();
for (EEnumLiteral literal : en.getELiterals()) {
created.getAcceptedValues().add(literal.getLiteral());
}
}
target.getAttributes().add(created);
}