@Override public boolean apply(ReferenceProperty input) { return input.isContainment(); } };
switch (containment) { case CONTAINING: _switchResult = refProp.isContainment(); break; case NON_CONTAINING: boolean _isContainment = refProp.isContainment(); _switchResult = (!_isContainment); break; break; case CONTAINMENT: _switchResult = (refProp.isContainer() || refProp.isContainment()); break; case NON_CONTAINMENT: _switchResult = ((!refProp.isContainer()) && (!refProp.isContainment())); break; default:
@Check public void checkCircularContainment(ReferenceProperty referenceProperty) { if (referenceProperty.isContainment()) { Structure contained = referenceProperty.getType(); checkCircularContainment(Sets.newHashSet(referenceProperty.getContainingDataType()), contained); } }
@Check public void checkContainerReferenceProperty(ReferenceProperty referenceProperty) { if (referenceProperty.isContainer()) { ReferenceProperty inverse = referenceProperty.getInverse(); if (inverse != null && !inverse.isContainment()) { String message = String.format( "The inverse reference property '%s' of the data type '%s' is not a containing reference. An inverse container reference property must specify a containing reference as its inverse.", inverse.getName(), inverse.getContainingDataType().getName()); error(message, RapidmlPackage.Literals.REFERENCE_PROPERTY__CONTAINER); return; } } }
/** * The container keyword must be used on any reference that is the inverse of a containing reference. The container * keyword must not be used on any reference that is not the inverse of a containing reference. */ @Check public void checkContainmentReferenceProperty(ReferenceProperty referenceProperty) { if (referenceProperty.isContainment()) { ReferenceProperty inverse = referenceProperty.getInverse(); if (inverse != null && !inverse.isContainer()) { String message = String.format( "The inverse reference property '%s' of the data type '%s' is not a container reference. An inverse containing reference property must specify a container reference as its inverse.", inverse.getName(), inverse.getContainingDataType().getName()); error(message, RapidmlPackage.Literals.REFERENCE_PROPERTY__CONTAINMENT); } } }
newReferenceProperty.setType(inheritedReferenceProperty.getType()); newReferenceProperty.setContainer(inheritedReferenceProperty.isContainer()); newReferenceProperty.setContainment(inheritedReferenceProperty.isContainment()); newReferenceProperty.setInverse(inheritedReferenceProperty.getInverse()); newProperty = newReferenceProperty;
StringConcatenation _builder = new StringConcatenation(); boolean _isContainment = property.isContainment(); if (_isContainment) { _builder.append("containing");