Projects >> graph-collections >>56b7d30f82db1ed0aadfd9738d03e6adbfd65a43

Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.radixtree;

import org.neo4j.graphdb.RelationshipType;


public enum RadixTreeRelationshipTypes implements RelationshipType {
	
	RADIXTREE_ROOT,
    RADIXTREE_TREE,
    RADIXTREE_LEAF
	
=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.radixtree;

import org.neo4j.graphdb.RelationshipType;


public enum RadixTreeRelationshipTypes implements RelationshipType {
	
	RADIXTREE_ROOT,
    RADIXTREE_TREE,
    RADIXTREE_LEAF
	
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.radixtree;

import org.neo4j.graphdb.RelationshipType;


public enum RadixTreeRelationshipTypes implements RelationshipType {
	
	RADIXTREE_ROOT,
    RADIXTREE_TREE,
    RADIXTREE_LEAF
	
}
File
RadixTreeRelationshipTypes.java
Developer's decision
Version 1
Kind of conflict
Comment
Enum value
Import
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.RelationshipType;


public enum RTreeRelationshipTypes implements RelationshipType {
	
	RTREE_METADATA, 
	RTREE_ROOT, 
	RTREE_CHILD, 
	RTREE_REFERENCE
	
=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.RelationshipType;


public enum RTreeRelationshipTypes implements RelationshipType {
	
	RTREE_METADATA, 
	RTREE_ROOT, 
	RTREE_CHILD, 
	RTREE_REFERENCE
	
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.RelationshipType;


public enum RTreeRelationshipTypes implements RelationshipType {
	
	RTREE_METADATA, 
	RTREE_ROOT, 
	RTREE_CHILD, 
	RTREE_REFERENCE
	
}
File
RTreeRelationshipTypes.java
Developer's decision
Version 1
Kind of conflict
Comment
Enum value
Import
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public interface SpatialIndexReader {

	EnvelopeDecoder getEnvelopeDecoder();
=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public interface SpatialIndexReader {

	EnvelopeDecoder getEnvelopeDecoder();
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
	
	boolean isEmpty();	
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public interface SpatialIndexReader {

	EnvelopeDecoder getEnvelopeDecoder();
	
	boolean isEmpty();	
File
SpatialIndexReader.java
Developer's decision
Version 1
Kind of conflict
Comment
Import
Method interface
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.Node;


public interface SpatialIndexVisitor {

	boolean needsToVisit(Envelope indexNodeEnvelope);

	void onIndexReference(Node geomNode);
	
=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.Node;


public interface SpatialIndexVisitor {

	boolean needsToVisit(Envelope indexNodeEnvelope);

	void onIndexReference(Node geomNode);
	
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.Node;


public interface SpatialIndexVisitor {

	boolean needsToVisit(Envelope indexNodeEnvelope);
	void onIndexReference(Node geomNode);
	
}
File
SpatialIndexVisitor.java
Developer's decision
Version 1
Kind of conflict
Comment
Import
Method interface
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.Node;


public interface SpatialIndexWriter extends SpatialIndexReader {

	void add(Node geomNode);
	
	void remove(long geomNodeId, boolean deleteGeomNode);
	
	void removeAll(boolean deleteGeomNodes, Listener monitor);
	
	void clear(Listener monitor);
	
=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.Node;


public interface SpatialIndexWriter extends SpatialIndexReader {

	void add(Node geomNode);
	
	void remove(long geomNodeId, boolean deleteGeomNode);
	
	void removeAll(boolean deleteGeomNodes, Listener monitor);
	
	void clear(Listener monitor);
	
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.graphdb.Node;


public interface SpatialIndexWriter extends SpatialIndexReader {

	void add(Node geomNode);
	
	void remove(long geomNodeId, boolean deleteGeomNode);
	
	void removeAll(boolean deleteGeomNodes, Listener monitor);
	
	void clear(Listener monitor);
	
}
File
SpatialIndexWriter.java
Developer's decision
Version 1
Kind of conflict
Comment
Import
Method interface
Package declaration
Chunk
Conflicting content
	}

	@Override
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

public abstract class AbstractSearchEnvelopeIntersection implements SearchFilter {
	
	protected EnvelopeDecoder decoder;
	protected Envelope referenceEnvelope;

	public AbstractSearchEnvelopeIntersection(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		this.decoder = decoder;
		this.referenceEnvelope = referenceEnvelope;
	public boolean needsToVisit(Envelope indexNodeEnvelope) {
		return indexNodeEnvelope.intersects(referenceEnvelope);
	}
	
	@Override
	public final boolean geometryMatches(Node geomNode) {	
		Envelope geomEnvelope = decoder.decodeEnvelope(geomNode);
		if (geomEnvelope.intersects(referenceEnvelope)) {
			return onEnvelopeIntersection(geomNode, geomEnvelope);
		}
		
		return false;
	}
	
	@Override
	public String toString() {
		return "SearchEnvelopeIntersection[" + referenceEnvelope + "]";
	}
	
	protected abstract boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope);
=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

public abstract class AbstractSearchEnvelopeIntersection implements SearchFilter {
	
	protected EnvelopeDecoder decoder;
	protected Envelope referenceEnvelope;

	public AbstractSearchEnvelopeIntersection(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		this.decoder = decoder;
		this.referenceEnvelope = referenceEnvelope;
	}

	@Override
	public boolean needsToVisit(Envelope indexNodeEnvelope) {
		return indexNodeEnvelope.intersects(referenceEnvelope);
	}
	
	@Override
	public final boolean geometryMatches(Node geomNode) {	
		Envelope geomEnvelope = decoder.decodeEnvelope(geomNode);
		if (geomEnvelope.intersects(referenceEnvelope)) {
			return onEnvelopeIntersection(geomNode, geomEnvelope);
		}
		
		return false;
	}
	
	@Override
	public String toString() {
		return "SearchEnvelopeIntersection[" + referenceEnvelope + "]";
	}
	
	protected abstract boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope);
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

public abstract class AbstractSearchEnvelopeIntersection implements SearchFilter {
	
	protected EnvelopeDecoder decoder;
	protected Envelope referenceEnvelope;

	public AbstractSearchEnvelopeIntersection(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		this.decoder = decoder;
		this.referenceEnvelope = referenceEnvelope;
	}

	@Override
	public boolean needsToVisit(Envelope indexNodeEnvelope) {
		return indexNodeEnvelope.intersects(referenceEnvelope);
	}
	
	@Override
	public final boolean geometryMatches(Node geomNode) {	
		Envelope geomEnvelope = decoder.decodeEnvelope(geomNode);
		if (geomEnvelope.intersects(referenceEnvelope)) {
			return onEnvelopeIntersection(geomNode, geomEnvelope);
		}
		
		return false;
	}
	
	@Override
	public String toString() {
		return "SearchEnvelopeIntersection[" + referenceEnvelope + "]";
	}
	
	protected abstract boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope);
}
File
AbstractSearchEnvelopeIntersection.java
Developer's decision
Version 1
Kind of conflict
Annotation
Attribute
Comment
Import
Method declaration
Method interface
Package declaration
Chunk
Conflicting content
package org.neo4j.collections.rtree.filter;
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.graphdb.Node;

public class SearchAll implements SearchFilter {

	@Override
	public boolean needsToVisit(Envelope indexNodeEnvelope) {
		return true;
	}

	@Override
	public boolean geometryMatches(Node geomNode) {
		return true;
	}

=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.graphdb.Node;

public class SearchAll implements SearchFilter {

	@Override
	public boolean needsToVisit(Envelope indexNodeEnvelope) {
		return true;
	}

	@Override
	public boolean geometryMatches(Node geomNode) {
		return true;
	}

>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.graphdb.Node;

public class SearchAll implements SearchFilter {

	@Override
	public boolean needsToVisit(Envelope indexNodeEnvelope) {
		return true;
	}

	@Override
	public boolean geometryMatches(Node geomNode) {
		return true;
	}

}
File
SearchAll.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

/**
 * Find Envelopes covered by the given Envelope
 */
public class SearchCoveredByEnvelope extends AbstractSearchEnvelopeIntersection {

	public SearchCoveredByEnvelope(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		super(decoder, referenceEnvelope);
	}

	@Override
	protected boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope) {
		// check if every point of this Envelope is a point of the Reference Envelope
	    return referenceEnvelope.contains(geomEnvelope);
	}

=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

/**
 * Find Envelopes covered by the given Envelope
 */
public class SearchCoveredByEnvelope extends AbstractSearchEnvelopeIntersection {

	public SearchCoveredByEnvelope(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		super(decoder, referenceEnvelope);
	}

	@Override
	protected boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope) {
		// check if every point of this Envelope is a point of the Reference Envelope
	    return referenceEnvelope.contains(geomEnvelope);
	}

>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

/**
 * Find Envelopes covered by the given Envelope
 */
public class SearchCoveredByEnvelope extends AbstractSearchEnvelopeIntersection {

	public SearchCoveredByEnvelope(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		super(decoder, referenceEnvelope);
	}

	@Override
	protected boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope) {
		// check if every point of this Envelope is a point of the Reference Envelope
	    return referenceEnvelope.contains(geomEnvelope);
	}

}
File
SearchCoveredByEnvelope.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

public class SearchEqualEnvelopes extends AbstractSearchEnvelopeIntersection {

	public SearchEqualEnvelopes(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		super(decoder, referenceEnvelope);
	}

	@Override
	protected boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope) {
		return referenceEnvelope.contains(geomEnvelope) && geomEnvelope.contains(referenceEnvelope);
	}

=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

public class SearchEqualEnvelopes extends AbstractSearchEnvelopeIntersection {

	public SearchEqualEnvelopes(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		super(decoder, referenceEnvelope);
	}

	@Override
	protected boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope) {
		return referenceEnvelope.contains(geomEnvelope) && geomEnvelope.contains(referenceEnvelope);
	}

>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
import org.neo4j.collections.rtree.EnvelopeDecoder;
import org.neo4j.graphdb.Node;

public class SearchEqualEnvelopes extends AbstractSearchEnvelopeIntersection {

	public SearchEqualEnvelopes(EnvelopeDecoder decoder, Envelope referenceEnvelope) {
		super(decoder, referenceEnvelope);
	}

	@Override
	protected boolean onEnvelopeIntersection(Node geomNode, Envelope geomEnvelope) {
		return referenceEnvelope.contains(geomEnvelope) && geomEnvelope.contains(referenceEnvelope);
	}

}
File
SearchEqualEnvelopes.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree.filter;

import org.neo4j.collections.rtree.Envelope;
File
SearchFilter.java
Developer's decision
Version 1
Kind of conflict
Comment
Package declaration
Chunk
Conflicting content
        assertEquals(2, hits.size());
        hits = index.query("[122 TO 125]");
        assertEquals(3, hits.size());
<<<<<<< HEAD
        
        ExecutionEngine engine = new ExecutionEngine( db );
        ExecutionResult result = engine.execute( "start n=node:timeline1('[100 TO 200]') return n" );
        System.out.println( result.toString() );
=======

        ExecutionEngine engine = new ExecutionEngine(db);
        ExecutionResult result = engine.execute("start n=node:timeline1('[100 TO 200]') return n");
        System.out.println(result.toString());
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1

    }
Solution content
        assertEquals(2, hits.size());
        hits = index.query("[122 TO 125]");
        assertEquals(3, hits.size());

        ExecutionEngine engine = new ExecutionEngine(db);
        ExecutionResult result = engine.execute("start n=node:timeline1('[100 TO 200]') return n");
        System.out.println(result.toString());

    }
File
TimelineIndexProviderTest.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class SpatialIndexPerformanceProxy implements SpatialIndexReader {

    // Constructor

    public SpatialIndexPerformanceProxy(SpatialIndexReader spatialIndex) {
        this.spatialIndex = spatialIndex;
    }

    
    // Public methods

	public EnvelopeDecoder getEnvelopeDecoder() {
		return spatialIndex.getEnvelopeDecoder();
	}
    
    public Envelope getBoundingBox() {
        long start = System.currentTimeMillis();
        Envelope result = spatialIndex.getBoundingBox();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getBoundingBox): " + (stop - start) + "ms");
        return result;
    }

    public boolean isEmpty() {
        long start = System.currentTimeMillis();    	
    	boolean result = spatialIndex.isEmpty();
    	long stop = System.currentTimeMillis();
        System.out.println("# exec time(isEmpty): " + (stop - start) + "ms");
        return result;    	
    }
    
    public int count() {
        long start = System.currentTimeMillis();
        int count = spatialIndex.count();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(count): " + (stop - start) + "ms");
        return count;
    }
    
	public boolean isNodeIndexed(Long nodeId) {
        long start = System.currentTimeMillis();
		boolean result = spatialIndex.isNodeIndexed(nodeId);
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(isNodeIndexed(" + nodeId + ")): " + (stop - start) + "ms");		
		return result;
	}    

    public Iterable getAllIndexedNodes() {
        long start = System.currentTimeMillis();    	
	    Iterable result = spatialIndex.getAllIndexedNodes();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getAllIndexedNodes()): " + (stop - start) + "ms");	    
	    return result;
    }

    
    // Attributes

    private SpatialIndexReader spatialIndex;


	@Override
	public SearchResults searchIndex(SearchFilter filter) {
        long start = System.currentTimeMillis();    	
	    SearchResults result = spatialIndex.searchIndex(filter);
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getAllIndexedNodes()): " + (stop - start) + "ms");	    
	    return result;
	}
=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class SpatialIndexPerformanceProxy implements SpatialIndexReader {

    // Constructor

    public SpatialIndexPerformanceProxy(SpatialIndexReader spatialIndex) {
        this.spatialIndex = spatialIndex;
    }

    
    // Public methods

	public EnvelopeDecoder getEnvelopeDecoder() {
		return spatialIndex.getEnvelopeDecoder();
	}
    
    public Envelope getBoundingBox() {
        long start = System.currentTimeMillis();
        Envelope result = spatialIndex.getBoundingBox();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getBoundingBox): " + (stop - start) + "ms");
        return result;
    }

    public boolean isEmpty() {
        long start = System.currentTimeMillis();    	
    	boolean result = spatialIndex.isEmpty();
    	long stop = System.currentTimeMillis();
        System.out.println("# exec time(isEmpty): " + (stop - start) + "ms");
        return result;    	
    }
    
    public int count() {
        long start = System.currentTimeMillis();
        int count = spatialIndex.count();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(count): " + (stop - start) + "ms");
        return count;
    }
    
	public boolean isNodeIndexed(Long nodeId) {
        long start = System.currentTimeMillis();
		boolean result = spatialIndex.isNodeIndexed(nodeId);
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(isNodeIndexed(" + nodeId + ")): " + (stop - start) + "ms");		
		return result;
	}    

    public Iterable getAllIndexedNodes() {
        long start = System.currentTimeMillis();    	
	    Iterable result = spatialIndex.getAllIndexedNodes();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getAllIndexedNodes()): " + (stop - start) + "ms");	    
	    return result;
    }

    
    // Attributes

    private SpatialIndexReader spatialIndex;


	@Override
	public SearchResults searchIndex(SearchFilter filter) {
        long start = System.currentTimeMillis();    	
	    SearchResults result = spatialIndex.searchIndex(filter);
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getAllIndexedNodes()): " + (stop - start) + "ms");	    
	    return result;
	}
>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class SpatialIndexPerformanceProxy implements SpatialIndexReader {

    // Constructor

    public SpatialIndexPerformanceProxy(SpatialIndexReader spatialIndex) {
        this.spatialIndex = spatialIndex;
    }

    
    // Public methods

	public EnvelopeDecoder getEnvelopeDecoder() {
		return spatialIndex.getEnvelopeDecoder();
	}
    
    public Envelope getBoundingBox() {
        long start = System.currentTimeMillis();
        Envelope result = spatialIndex.getBoundingBox();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getBoundingBox): " + (stop - start) + "ms");
        return result;
    }

    public boolean isEmpty() {
        long start = System.currentTimeMillis();    	
    	boolean result = spatialIndex.isEmpty();
    	long stop = System.currentTimeMillis();
        System.out.println("# exec time(isEmpty): " + (stop - start) + "ms");
        return result;    	
    }
    
    public int count() {
        long start = System.currentTimeMillis();
        int count = spatialIndex.count();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(count): " + (stop - start) + "ms");
        return count;
    }
    
	public boolean isNodeIndexed(Long nodeId) {
        long start = System.currentTimeMillis();
		boolean result = spatialIndex.isNodeIndexed(nodeId);
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(isNodeIndexed(" + nodeId + ")): " + (stop - start) + "ms");		
		return result;
	}    

    public Iterable getAllIndexedNodes() {
        long start = System.currentTimeMillis();    	
	    Iterable result = spatialIndex.getAllIndexedNodes();
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getAllIndexedNodes()): " + (stop - start) + "ms");	    
	    return result;
    }

    
    // Attributes

    private SpatialIndexReader spatialIndex;


	@Override
	public SearchResults searchIndex(SearchFilter filter) {
        long start = System.currentTimeMillis();    	
	    SearchResults result = spatialIndex.searchIndex(filter);
        long stop = System.currentTimeMillis();
        System.out.println("# exec time(getAllIndexedNodes()): " + (stop - start) + "ms");	    
	    return result;
	}
}
File
SpatialIndexPerformanceProxy.java
Developer's decision
Version 1
Kind of conflict
Annotation
Attribute
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
 */
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
package org.neo4j.collections.rtree;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.neo4j.collections.rtree.filter.SearchCoveredByEnvelope;
import org.neo4j.collections.rtree.filter.SearchEqualEnvelopes;
import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class TestSearch extends SpatialTestCase {
	
	@Test
	public void myFirstTest() {
		RTreeIndex index = new RTreeIndex(graphDb(), graphDb().getReferenceNode(), 
				new EnvelopeDecoderFromDoubleArray("bbox"));

		assertTrue(index.isEmpty());
		assertEquals(0, index.count());		
		
//		// invalid bbox test
//		index.add(createGeomNode(0, 0, -2, -3));
		
		// equal bbox test
		index.add(createGeomNode(0, 0, 2, 3));
		
		
		index.add(createGeomNode(10, 0));
		index.add(createGeomNode(12, 0));
		index.add(createGeomNode(14, 2));
		index.add(createGeomNode(25, 32));
		
		Node geomNode = createGeomNode(11, 1);
		index.add(geomNode);

		assertFalse(index.isEmpty());
		assertEquals(6, index.count());		
		
		assertTrue(index.isNodeIndexed(geomNode.getId()));
		index.remove(geomNode.getId(), false);
		assertFalse(index.isNodeIndexed(geomNode.getId()));		
		
		assertEquals(5, index.count());
		
		Envelope bbox = index.getBoundingBox();
		Envelope expectedBbox = new Envelope(0, 25, 0, 32);
		assertEnvelopeEquals(bbox, expectedBbox);
		
		SearchFilter search = new SearchEqualEnvelopes(index.getEnvelopeDecoder(), new Envelope(0, 2, 0, 3));
		SearchResults results = index.searchIndex(search);
		assertEquals(1, results.count());

		search = new SearchCoveredByEnvelope(index.getEnvelopeDecoder(), new Envelope(9, 15, -1, 3));
		results = index.searchIndex(search);
		assertEquals(3, results.count());
		
		index.clear(new NullListener());
		assertEquals(0, index.count());
		
		debugIndexTree(index, graphDb().getReferenceNode());
	}

=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.neo4j.collections.rtree.filter.SearchCoveredByEnvelope;
import org.neo4j.collections.rtree.filter.SearchEqualEnvelopes;
import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class TestSearch extends SpatialTestCase {
	
	@Test
	public void myFirstTest() {
		RTreeIndex index = new RTreeIndex(graphDb(), graphDb().getReferenceNode(), 
				new EnvelopeDecoderFromDoubleArray("bbox"));

		assertTrue(index.isEmpty());
		assertEquals(0, index.count());		
		
//		// invalid bbox test
//		index.add(createGeomNode(0, 0, -2, -3));
		
		// equal bbox test
		index.add(createGeomNode(0, 0, 2, 3));
		
		index.add(createGeomNode(10, 0));
		index.add(createGeomNode(12, 0));
		index.add(createGeomNode(14, 2));
		index.add(createGeomNode(25, 32));
		
		Node geomNode = createGeomNode(11, 1);
		index.add(geomNode);

		assertFalse(index.isEmpty());
		assertEquals(6, index.count());		
		
		assertTrue(index.isNodeIndexed(geomNode.getId()));
		index.remove(geomNode.getId(), false);
		assertFalse(index.isNodeIndexed(geomNode.getId()));		
		
		assertEquals(5, index.count());
		Envelope bbox = index.getBoundingBox();
		Envelope expectedBbox = new Envelope(0, 25, 0, 32);
		assertEnvelopeEquals(bbox, expectedBbox);
		
		SearchFilter search = new SearchEqualEnvelopes(index.getEnvelopeDecoder(), new Envelope(0, 2, 0, 3));
		SearchResults results = index.searchIndex(search);
		assertEquals(1, results.count());

		search = new SearchCoveredByEnvelope(index.getEnvelopeDecoder(), new Envelope(9, 15, -1, 3));
		results = index.searchIndex(search);
		assertEquals(3, results.count());
		
		index.clear(new NullListener());
		assertEquals(0, index.count());
		
		debugIndexTree(index, graphDb().getReferenceNode());
	}

>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;
import org.neo4j.collections.rtree.filter.SearchCoveredByEnvelope;
import org.neo4j.collections.rtree.filter.SearchEqualEnvelopes;
import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class TestSearch extends SpatialTestCase {
	
	@Test
	public void myFirstTest() {
		RTreeIndex index = new RTreeIndex(graphDb(), graphDb().getReferenceNode(), 
				new EnvelopeDecoderFromDoubleArray("bbox"));

		assertTrue(index.isEmpty());
		assertEquals(0, index.count());		
		
//		// invalid bbox test
//		index.add(createGeomNode(0, 0, -2, -3));
		
		// equal bbox test
		index.add(createGeomNode(0, 0, 2, 3));
		
		index.add(createGeomNode(10, 0));
		index.add(createGeomNode(12, 0));
		index.add(createGeomNode(14, 2));
		index.add(createGeomNode(25, 32));
		
		Node geomNode = createGeomNode(11, 1);
		index.add(geomNode);

		assertFalse(index.isEmpty());
		assertEquals(6, index.count());		
		
		assertTrue(index.isNodeIndexed(geomNode.getId()));
		index.remove(geomNode.getId(), false);
		assertFalse(index.isNodeIndexed(geomNode.getId()));		
		
		assertEquals(5, index.count());
		
		Envelope bbox = index.getBoundingBox();
		Envelope expectedBbox = new Envelope(0, 25, 0, 32);
		assertEnvelopeEquals(bbox, expectedBbox);
		
		SearchFilter search = new SearchEqualEnvelopes(index.getEnvelopeDecoder(), new Envelope(0, 2, 0, 3));
		SearchResults results = index.searchIndex(search);
		assertEquals(1, results.count());

		search = new SearchCoveredByEnvelope(index.getEnvelopeDecoder(), new Envelope(9, 15, -1, 3));
		results = index.searchIndex(search);
		assertEquals(3, results.count());
		
		index.clear(new NullListener());
		assertEquals(0, index.count());
		
		debugIndexTree(index, graphDb().getReferenceNode());
	}

}
File
TestSearch.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Import
Method declaration
Package declaration
Chunk
Conflicting content
<<<<<<< HEAD
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

import org.junit.Test;
import org.neo4j.collections.rtree.filter.SearchCoveredByEnvelope;
import org.neo4j.collections.rtree.filter.SearchEqualEnvelopes;
import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class TestSearchFilter extends SpatialTestCase {
	
	@Test
	public void searchIndexWithFilter() {
		RTreeIndex index = new RTreeIndex(graphDb(), graphDb().getReferenceNode(),  
				new EnvelopeDecoderFromDoubleArray("bbox"));

		// equal bbox test
		index.add(createGeomNode(0, 0, 2, 3));
		
		index.add(createGeomNode(10, 0));
		index.add(createGeomNode(12, 0));
		index.add(createGeomNode(14, 2));
		index.add(createGeomNode(25, 32));
		
		assertFalse(index.isEmpty());
		assertEquals(5, index.count());
		
		SearchFilter filter = new SearchEqualEnvelopes(index.getEnvelopeDecoder(), new Envelope(0, 2, 0, 3));
		SearchResults results = index.searchIndex(filter);

		int count = 0;
		for (Node node : results) {
			System.out.println("found node: " + node.getId());
			count++;
		}
		
		assertEquals(1, count);
		
		filter = new SearchCoveredByEnvelope(index.getEnvelopeDecoder(), new Envelope(9, 15, -1, 3));
		results = index.searchIndex(filter);
		
		count = 0;
		for (Node node : results) {
			System.out.println("found node: " + node.getId());
			count++;
		}
		
		assertEquals(3, count);
	}

=======
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 *
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

import org.junit.Test;
import org.neo4j.collections.rtree.filter.SearchCoveredByEnvelope;
import org.neo4j.collections.rtree.filter.SearchEqualEnvelopes;
import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class TestSearchFilter extends SpatialTestCase {
	
	@Test
	public void searchIndexWithFilter() {
		RTreeIndex index = new RTreeIndex(graphDb(), graphDb().getReferenceNode(),  
				new EnvelopeDecoderFromDoubleArray("bbox"));

		// equal bbox test
		index.add(createGeomNode(0, 0, 2, 3));
		
		index.add(createGeomNode(10, 0));
		index.add(createGeomNode(12, 0));
		index.add(createGeomNode(14, 2));
		index.add(createGeomNode(25, 32));
		
		assertFalse(index.isEmpty());
		assertEquals(5, index.count());
		
		SearchFilter filter = new SearchEqualEnvelopes(index.getEnvelopeDecoder(), new Envelope(0, 2, 0, 3));
		SearchResults results = index.searchIndex(filter);

		int count = 0;
		for (Node node : results) {
			System.out.println("found node: " + node.getId());
			count++;
		}
		
		assertEquals(1, count);
		
		filter = new SearchCoveredByEnvelope(index.getEnvelopeDecoder(), new Envelope(9, 15, -1, 3));
		results = index.searchIndex(filter);
		
		count = 0;
		for (Node node : results) {
			System.out.println("found node: " + node.getId());
			count++;
		}
		
		assertEquals(3, count);
	}

>>>>>>> 1e01b28fa66066506f9f1afd4d0e13f02be539f1
}
Solution content
 *
/**
 * Copyright (c) 2002-2013 "Neo Technology,"
 * Network Engine for Objects in Lund AB [http://neotechnology.com]
 * This file is part of Neo4j.
 *
 * Neo4j is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see .
 */
package org.neo4j.collections.rtree;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

import org.junit.Test;
import org.neo4j.collections.rtree.filter.SearchCoveredByEnvelope;
import org.neo4j.collections.rtree.filter.SearchEqualEnvelopes;
import org.neo4j.collections.rtree.filter.SearchFilter;
import org.neo4j.collections.rtree.filter.SearchResults;
import org.neo4j.graphdb.Node;


public class TestSearchFilter extends SpatialTestCase {
	
	@Test
	public void searchIndexWithFilter() {
		RTreeIndex index = new RTreeIndex(graphDb(), graphDb().getReferenceNode(),  
				new EnvelopeDecoderFromDoubleArray("bbox"));

		// equal bbox test
		index.add(createGeomNode(0, 0, 2, 3));
		
		index.add(createGeomNode(10, 0));
		index.add(createGeomNode(12, 0));
		index.add(createGeomNode(14, 2));
		index.add(createGeomNode(25, 32));
		
		assertFalse(index.isEmpty());
		assertEquals(5, index.count());
		
		SearchFilter filter = new SearchEqualEnvelopes(index.getEnvelopeDecoder(), new Envelope(0, 2, 0, 3));
		SearchResults results = index.searchIndex(filter);

		int count = 0;
		for (Node node : results) {
			System.out.println("found node: " + node.getId());
			count++;
		}
		
		assertEquals(1, count);
		
		filter = new SearchCoveredByEnvelope(index.getEnvelopeDecoder(), new Envelope(9, 15, -1, 3));
		results = index.searchIndex(filter);
		
		count = 0;
		for (Node node : results) {
			System.out.println("found node: " + node.getId());
			count++;
		}
		
		assertEquals(3, count);
	}

}
File
TestSearchFilter.java
Developer's decision
Version 1
Kind of conflict
Annotation
Comment
Import
Method declaration
Package declaration