Package com.tinkerpop.blueprints.util.io.graphson

Examples of com.tinkerpop.blueprints.util.io.graphson.GraphSONMode


        if (error != null) {
            return error;
        }

        final boolean showTypes = RequestObjectHelper.getShowTypes(requestObject);
        final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;
        final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(requestObject, WILDCARD);

        try {

            final JSONArray jsonArray = new JSONArray();
View Full Code Here


        if (error != null) {
            return error;
        }

        final boolean showTypes = RequestObjectHelper.getShowTypes(requestObject);
        final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;
        final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(requestObject, WILDCARD);

        try {

            final JSONArray jsonArray = new JSONArray();
View Full Code Here

            value = ElementHelper.getTypedPropertyValue(temp.toString());

        final Long start = RequestObjectHelper.getStartOffset(theRequestObject);
        final Long end = RequestObjectHelper.getEndOffset(theRequestObject);
        final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(theRequestObject);
        final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;

        long counter = 0l;

        if (null != index && key != null && value != null) {
            final CloseableIterable<Element> indexElements = (CloseableIterable<Element>) index.get(key, value);
View Full Code Here

    private Response getVertices(final String graphName, final boolean showTypes) {
        final RexsterApplicationGraph rag = this.getRexsterApplicationGraph(graphName);
        final Graph graph = rag.getGraph();

        final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;

        final JSONObject theRequestObject = this.getRequestObject();
        final Long start = RequestObjectHelper.getStartOffset(theRequestObject);
        final Long end = RequestObjectHelper.getEndOffset(theRequestObject);
        final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(theRequestObject);
View Full Code Here

            final Vertex vertex = rag.getGraph().getVertex(id);
            if (null != vertex) {

                final JSONObject theRequestObject = this.getRequestObject();
                final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;
                final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(theRequestObject);

                this.resultObject.put(Tokens.RESULTS, GraphSONUtility.jsonFromElement(vertex, returnKeys, mode));
                this.resultObject.put(Tokens.QUERY_TIME, this.sh.stopWatch());
View Full Code Here

                final JSONObject error = generateErrorObject(msg);
                throw new WebApplicationException(Response.status(Status.NOT_FOUND).entity(error).build());
            }

            final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;
            final JSONObject theRequestObject = this.getRequestObject();
            final Long start = RequestObjectHelper.getStartOffset(theRequestObject);
            final Long end = RequestObjectHelper.getEndOffset(theRequestObject);
            final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(theRequestObject);
View Full Code Here

                if (!key.startsWith(Tokens.UNDERSCORE)) {
                    vertex.setProperty(key, ElementHelper.getTypedPropertyValue(theRequestObject.get(key), parseTypes));
                }
            }

            final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;
            final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(theRequestObject);
            final JSONObject elementJson = GraphSONUtility.jsonFromElement(vertex, returnKeys, mode);

            rag.tryCommit();
View Full Code Here

            // some graph implementations close scope at the close of the transaction so this has to be
            // reconstituted
            final Vertex reconstitutedElement = graph.getVertex(vertex.getId());

            final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;
            final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(theRequestObject);
            this.resultObject.put(Tokens.RESULTS, GraphSONUtility.jsonFromElement(reconstitutedElement, returnKeys, mode));

            if (showHypermedia) {
                final JSONArray extensionsList = rag.getExtensionHypermedia(ExtensionPoint.VERTEX, this.getUriPath());
View Full Code Here

        final boolean showTypes = RequestObjectHelper.getShowTypes(requestObject);
        final long offsetStart = RequestObjectHelper.getStartOffset(requestObject);
        final long offsetEnd = RequestObjectHelper.getEndOffset(requestObject);
        final boolean returnTotal = getReturnTotal(requestObject);

        final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;
        final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(requestObject, WILDCARD);

        final String languageToExecuteWith = getLanguageToExecuteWith(requestObject);
        final EngineHolder engineHolder;
        final ScriptEngine scriptEngine;
View Full Code Here

                    generateErrorJson(extMethod.getExtensionApiAsJson()));
        }

        final JSONObject requestObject = context.getRequestObject();
        final boolean showTypes = RequestObjectHelper.getShowTypes(requestObject);
        final GraphSONMode mode = showTypes ? GraphSONMode.EXTENDED : GraphSONMode.NORMAL;
        final Set<String> returnKeys = RequestObjectHelper.getReturnKeys(requestObject, WILDCARD);

        if (!(graph instanceof SailGraph)) {
            final ExtensionMethod extMethod = context.getExtensionMethod();
            return ExtensionResponse.error(
View Full Code Here

TOP

Related Classes of com.tinkerpop.blueprints.util.io.graphson.GraphSONMode

Copyright © 2018 www.massapicom. 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.