/** * Checks if the referenceTreatment type is not null. * * @return the predicate */ public static java.util.function.Predicate<ReferenceTreatment> hasDeclaredType() { return input -> { if (null != input) { ReferenceElement reference = input.getReferenceElement(); return reference != null && null != reference.getDataType(); } return false; }; }
public static Structure getContextDataType(EObject context) { if (context instanceof ServiceDataResource) { return ((ServiceDataResource) context).getDataType(); } if (context instanceof TypedMessage) { return ((TypedMessage) context).getActualType(); } if (context instanceof ReferenceTreatment) { return ((ReferenceTreatment) context).getReferenceElement().getDataType(); } // not supported case return null; }
IScope scope_ReferenceTreatment_referenceElement(ReferenceTreatment referenceTreatment, EReference eRef) { EObject econtainer = referenceTreatment.eContainer(); final Structure contextDataType; if (econtainer instanceof ReferenceEmbed) { contextDataType = ((ReferenceEmbed) econtainer).getReferenceElement().getDataType(); } else if (econtainer instanceof ReferenceRealization) { contextDataType = ((ReferenceTreatment) ((ReferenceRealization) econtainer).eContainer()) .getReferenceElement().getDataType(); } else if (econtainer instanceof TypedMessage) { contextDataType = ((TypedMessage) econtainer).getActualType(); } else { contextDataType = ((RealizationContainer) econtainer).getDataType(); } Iterable<ReferenceProperty> result = Iterables.filter(getAllFeatures(contextDataType), ReferenceProperty.class); if (referenceTreatment instanceof ReferenceLink) { // leave only containment references, containment reference might // not be supported in WADL/XSD generator // result = filter(result, isContainmentReferenceProperty()); } return Scopes.scopeFor(result); }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @NOT-generated */ @Override public Structure getDataType() { Structure result = super.getDataType(); if (result != null) { return result; } if (eContainer() instanceof ReferenceTreatment && ((ReferenceTreatment)eContainer()).getReferenceElement() != null) { return ((ReferenceTreatment)eContainer()).getReferenceElement().getDataType(); } return null; }
/** * <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ public com.reprezen.rapidml.Structure getDataType() { if (eContainer() instanceof ServiceDataResource) { return ((ServiceDataResource) eContainer()).getDataType(); } if (eContainer() instanceof TypedMessage) { return ((TypedMessage) eContainer()).getActualType(); } if (eContainer() instanceof ReferenceRealization) { ReferenceRealization realization = (ReferenceRealization) eContainer(); ReferenceTreatment treatment = realization != null ? (ReferenceTreatment) realization.eContainer() : null; return treatment != null ? treatment.getReferenceElement().getDataType() : null; } if (eContainer() instanceof ReferenceTreatment) { return ((ReferenceTreatment) eContainer()).getReferenceElement().getDataType(); } return null; }
_builder.append(" "); _builder.append("<a href=\"#"); String _htmlLink = this.docHelper.htmlLink(referencedProperty.getDataType()); _builder.append(_htmlLink, " "); _builder.append("\">"); String _qualifiedName = this.importHelper.getQualifiedName(referencedProperty.getDataType()); _builder.append(_qualifiedName, " "); _builder.append("</a>");
_builder.append(_referenceTreatmentName, " "); _builder.append(" : "); String _name = ref.getReferenceElement().getDataType().getName(); _builder.append(_name, " "); String _cardinalityLabel = com.reprezen.genflow.common.xtend.XDataTypeExtensions.getCardinalityLabel(ref, resource.getIncludedProperties());
_builder.append("\t"); _builder.append("type: \'"); String _name_1 = treatment.getReferenceElement().getDataType().getName(); _builder.append(_name_1, "\t"); _builder.append("\',");