private String _getURISegmentId(final ServiceDataResource aResource, final MatrixParameter param) { String _name = aResource.getName(); String _plus = (_name + ".URI."); int _size = aResource.getURI().getSegments().size(); int _indexOf = this.getMatrixParameters(aResource).indexOf(param); int _plus_1 = (_size + _indexOf); int _plus_2 = (_plus_1 + 1); return (_plus + Integer.valueOf(_plus_2)); }
private String _getURISegmentId(final ServiceDataResource aResource, final CollectionParameter param) { String _name = aResource.getName(); String _plus = (_name + ".URI."); int _size = aResource.getURI().getSegments().size(); int _size_1 = this.getMatrixParameters(aResource).size(); int _plus_1 = (_size + _size_1); int _indexOf = this.getCollectionParameters(aResource).indexOf(param); int _plus_2 = (_plus_1 + _indexOf); int _plus_3 = (_plus_2 + 1); return (_plus + Integer.valueOf(_plus_3)); }
public static String getStringValue(Object object, StringBuffer result) { if (object instanceof HasStringValue) { if (object instanceof URI) { List<String> segments = new ArrayList<String>(((URI) object).getSegments().size()); for (URISegment segment : ((URI) object).getSegments()) { segments.add(segment.toString()); } return Joiner.on("/").join(segments); //$NON-NLS-1$ } else if (object instanceof URISegmentWithParameter) { return "{" + ((URISegmentWithParameter) object).getName() + "}"; //$NON-NLS-1$//$NON-NLS-2$ } else if (object instanceof URISegment) { return ((URISegment) object).getName(); } else if (object instanceof PrimitiveProperty) { PrimitiveProperty prop = (PrimitiveProperty) object; result.append(" (name: "); //$NON-NLS-1$ result.append(prop.getName()); result.append(", cardinality: "); //$NON-NLS-1$ result.append(prop.getCardinality()); result.append(", type: "); //$NON-NLS-1$ result.append(prop.getType()); result.append(')'); return result.toString(); } else { return null; } } return object.toString(); }
private String _getURISegmentId(final ServiceDataResource aResource, final URISegment segment) { String _name = aResource.getName(); String _plus = (_name + ".URI."); int _indexOf = aResource.getURI().getSegments().indexOf(segment); int _plus_1 = (_indexOf + 1); return (_plus + Integer.valueOf(_plus_1)); }
attrs.add(methodAttr); final String uri = IterableExtensions.join(method.getContainingResourceDefinition().getURI().getSegments(), "/"); StringConcatenation _builder = new StringConcatenation(); _builder.append("Route(\"");
if (_tripleNotEquals) { EList<URISegment> _segments = aResource.getURI().getSegments(); boolean _hasElements = false; for(final URISegment segment : _segments) { _builder.append(" "); if (((!aResource.getURI().getSegments().isEmpty()) && (!matrixParams.isEmpty()))) { _builder.append(","); _builder.append(" "); if ((((!this.getMatrixParameters(aResource).isEmpty()) || (!aResource.getURI().getSegments().isEmpty())) && (!params.isEmpty()))) { _builder.append(",");