Examples of relation()


Examples of com.amazonaws.hal.Link.relation()

                    return new HalLinkList(halResource, link.relation(), getCollectionType(method.getGenericReturnType(), 0, ResourceInfo.class), halClient);
                } else if (Map.class.isAssignableFrom(method.getReturnType())) {
                    //noinspection unchecked
                    return new HalLinkMap(halResource, link.relation(), link.keyField(), getCollectionType(method.getGenericReturnType(), 1, ResourceInfo.class), halClient);
                } else {
                    return halClient.getResource(halResource, method.getReturnType(), getRelationHref(link.relation(), args), false);
                }

            case POST:
                if (args == null) {
                    throw new IllegalArgumentException("POST operations require a representation argument.");
View Full Code Here

Examples of com.amazonaws.hal.Link.relation()

            case POST:
                if (args == null) {
                    throw new IllegalArgumentException("POST operations require a representation argument.");
                }

                return halClient.postResource(method.getReturnType(), getRelationHref(link.relation(), args), args[0]);

            case PUT:
                if (args == null) {
                    throw new IllegalArgumentException("PUT operations require a representation argument.");
                }
View Full Code Here

Examples of com.amazonaws.hal.Link.relation()

            case PUT:
                if (args == null) {
                    throw new IllegalArgumentException("PUT operations require a representation argument.");
                }

                return halClient.putResource(method.getReturnType(), getRelationHref(link.relation(), args), args[0]);

            case DELETE:
                halClient.deleteResource(getRelationHref(link.relation(), args));

                break;
View Full Code Here

Examples of com.amazonaws.hal.Link.relation()

                }

                return halClient.putResource(method.getReturnType(), getRelationHref(link.relation(), args), args[0]);

            case DELETE:
                halClient.deleteResource(getRelationHref(link.relation(), args));

                break;

            default:
                throw new UnsupportedOperationException("Unexpected HTTP method: " + link.method());
View Full Code Here

Examples of com.amazonaws.hal.Link.relation()

        if ((link = method.getAnnotation(Link.class)) != null) {
            switch (link.method()) {
            case GET:
                if (List.class.isAssignableFrom(method.getReturnType())) {
                    //noinspection unchecked
                    return new HalLinkList(halResource, link.relation(),
                                           getCollectionType(method.getGenericReturnType(), 0, ResourceInfo.class),
                                           halClient);
                } else if (Map.class.isAssignableFrom(method.getReturnType())) {
                    //noinspection unchecked
                    return new HalLinkMap(halResource, link.relation(), link.keyField(),
View Full Code Here

Examples of com.amazonaws.hal.Link.relation()

                    return new HalLinkList(halResource, link.relation(),
                                           getCollectionType(method.getGenericReturnType(), 0, ResourceInfo.class),
                                           halClient);
                } else if (Map.class.isAssignableFrom(method.getReturnType())) {
                    //noinspection unchecked
                    return new HalLinkMap(halResource, link.relation(), link.keyField(),
                                          getCollectionType(method.getGenericReturnType(), 1, ResourceInfo.class),
                                          halClient);
                } else {
                    return halClient.getResource(halResource, method.getReturnType(),
                                                 getRelationHref(link, args, method.getParameterAnnotations()), false);
View Full Code Here

Examples of com.amazonaws.hal.Link.relation()

        if ((link = method.getAnnotation(Link.class)) != null) {
            switch (link.method()) {
            case GET:
                if (List.class.isAssignableFrom(method.getReturnType())) {
                    //noinspection unchecked
                    return new HalLinkList(halResource, link.relation(),
                                           getCollectionType(method.getGenericReturnType(), 0, ResourceInfo.class),
                                           halClient);
                } else if (Map.class.isAssignableFrom(method.getReturnType())) {
                    //noinspection unchecked
                    return new HalLinkMap(halResource, link.relation(), link.keyField(),
View Full Code Here

Examples of com.amazonaws.hal.Link.relation()

                    return new HalLinkList(halResource, link.relation(),
                                           getCollectionType(method.getGenericReturnType(), 0, ResourceInfo.class),
                                           halClient);
                } else if (Map.class.isAssignableFrom(method.getReturnType())) {
                    //noinspection unchecked
                    return new HalLinkMap(halResource, link.relation(), link.keyField(),
                                          getCollectionType(method.getGenericReturnType(), 1, ResourceInfo.class),
                                          halClient);
                } else {
                    return halClient.getResource(halResource, method.getReturnType(),
                                                 getRelationHref(link, args, method.getParameterAnnotations()), false);
View Full Code Here

Examples of edu.ucla.sspace.dependency.DependencyRelation.relation()

                    // eventually be encountered and we'll account for it then.
                    if (!relation.headNode().word().equals(focusWord))
                        continue;

                    RelationTuple relationKey = new RelationTuple(
                            focusIndex, relation.relation().intern());
                    SparseDoubleVector relationVector = localTuples.get(
                            relationKey);
                    if (relationVector == null) {
                        relationVector = new CompactSparseVector();
                        localTuples.put(relationKey, relationVector);
View Full Code Here

Examples of edu.ucla.sspace.dependency.DependencyRelation.relation()

        return VectorMath.multiplyUnmodified(focusMeaning, secondMeaning);
    }

    private SparseDoubleVector contextualize(DependencyPath path) {
        DependencyRelation rel = path.iterator().next();
        String relation = rel.relation();
        String focusTerm = path.first().word();
        String otherTerm = path.last().word();

        // Skip any filtered features.
        if (otherTerm.equals(EMPTY_STRING))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.