mirror of
https://github.com/JHUAPL/AccumuloGraph.git
synced 2026-01-09 12:47:56 -05:00
Clean up unused functionality
This commit is contained in:
@@ -18,7 +18,6 @@ import java.util.Set;
|
||||
|
||||
import com.tinkerpop.blueprints.Element;
|
||||
import com.tinkerpop.blueprints.Index;
|
||||
import com.tinkerpop.blueprints.util.ExceptionFactory;
|
||||
import com.tinkerpop.blueprints.util.StringFactory;
|
||||
|
||||
import edu.jhuapl.tinkerpop.cache.PropertyCache;
|
||||
@@ -128,15 +127,12 @@ public abstract class AccumuloElement implements Element {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Refactor this to use index metadata.
|
||||
* Remove element from all named indexes.
|
||||
* @param element
|
||||
*/
|
||||
@Deprecated
|
||||
protected void removeElementFromNamedIndexes() {
|
||||
if (!globals.getConfig().getIndexableGraphDisabled()) {
|
||||
for (Index<? extends Element> index : globals.getGraph().getIndices()) {
|
||||
((AccumuloIndex<? extends Element>) index).getWrapper().removeElementFromIndex(this);
|
||||
}
|
||||
for (Index<? extends Element> index : globals.getNamedIndexListWrapper().getIndices()) {
|
||||
((AccumuloIndex<? extends Element>) index).getWrapper().removeElementFromIndex(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -71,12 +71,6 @@ public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
|
||||
|
||||
private GlobalInstances globals;
|
||||
|
||||
/**
|
||||
* @deprecated Remove when vertex functionality is gone.
|
||||
*/
|
||||
@Deprecated
|
||||
private BatchWriter vertexBW;
|
||||
|
||||
/**
|
||||
* Factory method for {@link GraphFactory}.
|
||||
*/
|
||||
@@ -109,21 +103,6 @@ public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
|
||||
} catch (Exception e) {
|
||||
throw new AccumuloGraphException(e);
|
||||
}
|
||||
|
||||
try {
|
||||
setupWriters();
|
||||
} catch (Exception e) {
|
||||
throw new AccumuloGraphException(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated This will go away along with {@link #vertexBW}.
|
||||
* @throws Exception
|
||||
*/
|
||||
@Deprecated
|
||||
private void setupWriters() throws Exception {
|
||||
vertexBW = globals.getMtbw().getBatchWriter(globals.getConfig().getVertexTableName());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -304,23 +283,6 @@ public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
|
||||
vertex.remove();
|
||||
}
|
||||
|
||||
// Maybe an Custom Iterator could make this better.
|
||||
/**
|
||||
* @deprecated Move to appropriate location.
|
||||
* @param element
|
||||
*/
|
||||
@Deprecated
|
||||
private void removeElementFromNamedIndexes(Element element) {
|
||||
for (Index<? extends Element> index : getIndices()) {
|
||||
((AccumuloIndex<? extends Element>) index).getWrapper().removeElementFromIndex(element);
|
||||
}
|
||||
}
|
||||
|
||||
private Text invert(Text columnFamily) {
|
||||
return columnFamily.toString().equals(Constants.IN_EDGE) ?
|
||||
new Text(Constants.OUT_EDGE) : new Text(Constants.IN_EDGE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<Vertex> getVertices() {
|
||||
return globals.getVertexWrapper().getVertices();
|
||||
@@ -465,6 +427,8 @@ public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
|
||||
@Override
|
||||
public <T extends Element> Index<T> createIndex(String indexName,
|
||||
Class<T> indexClass, Parameter... indexParameters) {
|
||||
// TODO Move below to appropriate place
|
||||
|
||||
if (indexClass == null) {
|
||||
throw ExceptionFactory.classForElementCannotBeNull();
|
||||
}
|
||||
@@ -627,7 +591,6 @@ public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
|
||||
}
|
||||
}
|
||||
}
|
||||
setupWriters();
|
||||
} catch (Exception e) {
|
||||
throw new AccumuloGraphException(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user