private void processPropertyOverride(Feature declaredProperty, Iterable<Feature> overriddenPropertyHierarchy) { if (declaredProperty instanceof PrimitiveProperty) { PrimitiveProperty declaredPrimitiveProperty = (PrimitiveProperty) declaredProperty; for (PrimitiveProperty overriddenProperty : Iterables.filter(overriddenPropertyHierarchy, PrimitiveProperty.class)) { EList<Constraint> constraintsToCopy = overriddenProperty.getAllConstraints(); for (Constraint next : constraintsToCopy) { Constraint newConstraint = EcoreUtil.copy(next); declaredPrimitiveProperty.getAllConstraints().add(newConstraint); } } } if (declaredProperty.getDocumentation() == null) { for (Feature next : overriddenPropertyHierarchy) { if (next.getDocumentation() != null) { Documentation documentation = RapidmlFactory.eINSTANCE.createDocumentation(); documentation.setText(next.getDocumentation().getText()); declaredProperty.setDocumentation(documentation); } } } if (declaredProperty.getCardinality() == null) { for (Feature next : overriddenPropertyHierarchy) { if (next.getCardinality() != null) { declaredProperty.setCardinality(next.getCardinality()); } } } }
if (inheritedProperty.getDocumentation() != null) { Documentation documentation = RapidmlFactory.eINSTANCE.createDocumentation(); documentation.setText(inheritedProperty.getDocumentation().getText()); newProperty.setDocumentation(documentation);