args.add(param.getName());
public static List<PrimitiveProperty> getMandatoryProperties(ObjectRealization includedProperties) { List<PrimitiveProperty> result = new ArrayList<>(); RealizationContainer realizationContainer = includedProperties.getRealizationContainer(); if (realizationContainer instanceof ResourceDefinition) { ResourceDefinition resource = (ResourceDefinition) realizationContainer; if (resource.getURI() != null) { for (URIParameter param : resource.getURI().getUriParameters()) { if (param.getSourceReference() instanceof PropertyReference) { PropertyReference property = (PropertyReference) param.getSourceReference(); result.add(property.getConceptualFeature()); } } } } // TODO : for TypedMessage return Collections.unmodifiableList(result); }
public static ResourceDefinition getContainingResourceDefinition(SourceReference sourceReference) { Parameter containingParameter = sourceReference.getContainingParameter(); if (containingParameter instanceof URIParameter) { return (ResourceDefinition) ((URIParameter) containingParameter).getContainingURI().eContainer(); } if (containingParameter instanceof CollectionParameter) { return ((CollectionParameter) containingParameter).getContainingResourceDefinition(); } if (containingParameter instanceof MessageParameter) { MessageParameter messageParemeter = (MessageParameter) containingParameter; return ((Method) messageParemeter.getContainingMessage().eContainer()).getContainingResourceDefinition(); } // current metamodel doesn't support other kinds of containers return null; }
param.setName(it.getName()); param.setType(this._jsonSchemaHelper.getJSONSchemaTypeName(it.getSourceReference().getType())); String _jSONSchemaTypeFormat = this._jsonSchemaHelper.getJSONSchemaTypeFormat(it.getSourceReference().getType()); boolean _tripleNotEquals_1 = (_jSONSchemaTypeFormat != null); if (_tripleNotEquals_1) { param.setFormat(this._jsonSchemaHelper.getJSONSchemaTypeFormat(it.getSourceReference().getType())); _matched=true; ((PathParameter)param).setRequired(true); ((PathParameter)param).setDefaultValue(it.getDefault()); ((QueryParameter)param).setRequired(it.isRequired()); ((QueryParameter)param).setDefaultValue(it.getDefault());
SourceReference _sourceReference = it.getSourceReference(); return Boolean.valueOf((_sourceReference instanceof PropertyReference)); }; String _name = param.getName(); _builder.append(_name, "\t"); _builder.append(": \'"); SourceReference _sourceReference = param.getSourceReference(); String _name_1 = ((PropertyReference) _sourceReference).getConceptualFeature().getName(); _builder.append(_name_1, "\t");
final Class<?> paramType = this.getPrimitiveType(this.getSourceReferenceType(uriParam.getSourceReference())); StringConcatenation _builder = new StringConcatenation(); _builder.append("@"); _builder.append(_typeName); _builder.append("(\""); String _name = uriParam.getName(); _builder.append(_name); _builder.append("\") "); _builder.append(" "); String _escapeJavaKeywords = this.escapeJavaKeywords( uriParam.getName()); _builder.append(_escapeJavaKeywords); parameters.add(_builder.toString());