Projects >> rexster >>68ac91c5a0516df3b931b4bce3a0c8a405c7bd01

Chunk
Conflicting content
import com.tinkerpop.blueprints.pgm.*;
import com.tinkerpop.rexster.traversals.ElementJSONObject;
<<<<<<< HEAD
=======
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.restlet.representation.Representation;
import org.restlet.resource.Delete;
import org.restlet.resource.Get;
import org.restlet.resource.Post;
>>>>>>> b83a3f426231aa7b132f844269c3c36ba4c67a09

import java.util.Map;
import java.util.Set;
Solution content
import com.tinkerpop.blueprints.pgm.*;
import com.tinkerpop.rexster.traversals.ElementJSONObject;

import java.util.Map;
import java.util.Set;
File
VertexResource.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
import com.tinkerpop.rexster.WebServer;

import org.apache.log4j.Logger;
<<<<<<< HEAD
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;
=======
import org.json.simple.JSONObject;
import org.restlet.representation.Representation;
import org.restlet.resource.Get;
>>>>>>> b83a3f426231aa7b132f844269c3c36ba4c67a09

import java.util.*;
Solution content
import com.tinkerpop.rexster.WebServer;

import org.apache.log4j.Logger;
import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;

import java.util.*;
File
AbstractTraversal.java
Developer's decision
Version 1
Kind of conflict
Import
Chunk
Conflicting content
    	}
    }

<<<<<<< HEAD
    public JSONObject evaluate(RexsterResourceContext ctx) throws JSONException {
        
    	this.ctx = ctx;
    	this.graph = ctx.getRexsterApplicationGraph().getGraph();
    	this.requestObject = ctx.getRequestObject();
    	this.resultObject = ctx.getResultObject();
    	
    	this.preQuery();
=======
    //@Get

    public Representation evaluate() {
        Map queryParameters = createQueryMap(this.getRequest().getResourceRef().getQueryAsForm());

        String graphName = this.getRequest().getResourceRef().getSegments().get(0);
        this.graph = ((RexsterApplication) this.getApplication()).getGraph(graphName);

        this.buildRequestObject(queryParameters);
        this.preQuery();
>>>>>>> b83a3f426231aa7b132f844269c3c36ba4c67a09
        if (!usingCachedResult)
            this.traverse();
        this.postQuery();
Solution content
    	}
    }

    public JSONObject evaluate(RexsterResourceContext ctx) throws JSONException {
        
    	this.ctx = ctx;
    	this.graph = ctx.getRexsterApplicationGraph().getGraph();
    	this.requestObject = ctx.getRequestObject();
    	this.resultObject = ctx.getResultObject();
    	
    	this.preQuery();
        if (!usingCachedResult)
            this.traverse();
        this.postQuery();
File
AbstractTraversal.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Method invocation
Method signature
Variable
Chunk
Conflicting content
    /*
    @Get
<<<<<<< HEAD
    public JSONObject evaluate(final String json) {
    	
    	String graphName = this.getRequest().getResourceRef().getSegments().get(0);
=======
    public Representation evaluate(final String json) {

        String graphName = this.getRequest().getResourceRef().getSegments().get(0);
>>>>>>> b83a3f426231aa7b132f844269c3c36ba4c67a09
        this.graph = ((RexsterApplication) this.getApplication()).getGraph(graphName);

        if (null == json || json.length() == 0)
Solution content
    @Get

    /*
    public JSONObject evaluate(final String json) {
    	
    	String graphName = this.getRequest().getResourceRef().getSegments().get(0);
        this.graph = ((RexsterApplication) this.getApplication()).getGraph(graphName);
    	
        if (null == json || json.length() == 0)
File
AbstractTraversal.java
Developer's decision
Version 1
Kind of conflict
Comment
Method invocation
Method signature
Variable
Chunk
Conflicting content
            		vertices.add(graph.getVertex(propertyMap.get(key)));
            	} catch (JSONException ex) {}
            } else {
<<<<<<< HEAD
            	try {
	                Iterable elements = graph.getIndex().get(key, propertyMap.get(key));
	                if (null != elements) {
	                    for (Element element : elements) {
	                        if (element instanceof Vertex) {
	                            vertices.add((Vertex) element);
	                        }
	                    }
	                }
            	} catch (JSONException ex) {}
=======
                Iterable verticesIterable = ((IndexableGraph) graph).getIndex(Index.VERTICES, Vertex.class).get(key, propertyMap.get(key));
                for (Vertex vertex : verticesIterable) {
                    vertices.add(vertex);
                }
>>>>>>> b83a3f426231aa7b132f844269c3c36ba4c67a09
            }

        }
Solution content
            		vertices.add(graph.getVertex(propertyMap.get(key)));
            	} catch (JSONException ex) {}
            } else {
            	try {
	                //Iterable elements = graph.getIndex().get(key, propertyMap.get(key));
	                Iterable verticesIterable = ((IndexableGraph) graph).getIndex(Index.VERTICES, Vertex.class).get(key, propertyMap.get(key));
	                for (Vertex vertex : verticesIterable) {
	                    vertices.add(vertex);
	                }
            	} catch (JSONException ex) {}
            }
        }
File
AbstractTraversal.java
Developer's decision
Manual
Kind of conflict
For statement
Method invocation
Try statement
Variable