private Iterable<String> getContainmentXpath(final ReferenceLink referenceLink) { final Function1<ReferenceEmbed, ReferenceElement> _function = (ReferenceEmbed it) -> { return it.getReferenceElement(); }; final Function1<ReferenceElement, Iterable<String>> _function_1 = (ReferenceElement it) -> { return this.getContainmentXpath(it); }; return Iterables.<String>concat(ListExtensions.<ReferenceElement, Iterable<String>>map(ListExtensions.<ReferenceEmbed, ReferenceElement>map(referenceLink.getEmbedHierarchy(), _function), _function_1)); }
private void normalizeUserDefinedReferenceEmbed(final ReferenceEmbed embed) { maybeSetReferenceRealization(embed); removeInvalidTreatments(embed.getReferenceRealization().getReferenceTreatments()); ReferenceElement property = embed.getReferenceElement(); if (property != null) { if (!isDefailtRealization(embed)) { // Need to iterate on a copy of NestedReferenceTreatments because it can be modified during // normalization, // e.g. ReferenceLink will be deleted when it's converted to ReferenceEmbed for (ReferenceTreatment treatment : new ArrayList<>( embed.getReferenceRealization().getReferenceTreatments())) { // resolve nested reference treatments maybeConvertReferenceLinkToEmbed(embed, treatment); } } } }
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); }
final ReferenceElement referencedProperty = refEmbed.getReferenceElement(); final String cardinality = XDataTypeExtensions.getCardinalityLabel(refEmbed, includedProperies); StringConcatenation _builder = new StringConcatenation();
_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());