Separate out Features creation

This commit is contained in:
Michael Lieberman
2014-12-29 12:33:04 -05:00
parent f94bb2e9f4
commit 0f854ec2b7
2 changed files with 60 additions and 38 deletions

View File

@@ -0,0 +1,59 @@
/******************************************************************************
* COPYRIGHT NOTICE *
* Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory *
* All rights reserved. *
* *
* This material may only be used, modified, or reproduced by or for the *
* U.S. Government pursuant to the license rights granted under FAR clause *
* 52.227-14 or DFARS clauses 252.227-7013/7014. *
* *
* For any other permissions, please contact the Legal Office at JHU/APL. *
******************************************************************************/
package edu.jhuapl.tinkerpop;
import com.tinkerpop.blueprints.Features;
/**
* {@link Features} creator.
*/
public class AccumuloFeatures {
public static Features get() {
Features f = new Features();
// For simplicity, I accept all property types. They are handled in not the
// best way. To be fixed later.
f.ignoresSuppliedIds = true;
f.isPersistent = true;
f.isWrapper = false;
f.supportsBooleanProperty = true;
f.supportsDoubleProperty = true;
f.supportsDuplicateEdges = true;
f.supportsEdgeIndex = true;
f.supportsEdgeIteration = true;
f.supportsEdgeRetrieval = true;
f.supportsEdgeKeyIndex = true;
f.supportsEdgeProperties = true;
f.supportsFloatProperty = true;
f.supportsIndices = true;
f.supportsIntegerProperty = true;
f.supportsKeyIndices = true;
f.supportsLongProperty = true;
f.supportsMapProperty = true;
f.supportsMixedListProperty = true;
f.supportsPrimitiveArrayProperty = true;
f.supportsSelfLoops = true;
f.supportsSerializableObjectProperty = true;
f.supportsStringProperty = true;
f.supportsThreadedTransactions = false;
f.supportsTransactions = false;
f.supportsUniformListProperty = true;
f.supportsVertexIndex = true;
f.supportsVertexIteration = true;
f.supportsVertexKeyIndex = true;
f.supportsVertexProperties = true;
f.supportsThreadIsolatedTransactions = false;
return f;
}
}

View File

@@ -283,46 +283,9 @@ public class AccumuloGraph implements Graph, KeyIndexableGraph, IndexableGraph {
// End Aliases
// For simplicity, I accept all property types. They are handled in not the
// best way. To be fixed later
Features f;
@Override
public Features getFeatures() {
if (f == null) {
f = new Features();
f.ignoresSuppliedIds = true;
f.isPersistent = true;
f.isWrapper = false;
f.supportsBooleanProperty = true;
f.supportsDoubleProperty = true;
f.supportsDuplicateEdges = true;
f.supportsEdgeIndex = true;
f.supportsEdgeIteration = true;
f.supportsEdgeRetrieval = true;
f.supportsEdgeKeyIndex = true;
f.supportsEdgeProperties = true;
f.supportsFloatProperty = true;
f.supportsIndices = true;
f.supportsIntegerProperty = true;
f.supportsKeyIndices = true;
f.supportsLongProperty = true;
f.supportsMapProperty = true;
f.supportsMixedListProperty = true;
f.supportsPrimitiveArrayProperty = true;
f.supportsSelfLoops = true;
f.supportsSerializableObjectProperty = true;
f.supportsStringProperty = true;
f.supportsThreadedTransactions = false;
f.supportsTransactions = false;
f.supportsUniformListProperty = true;
f.supportsVertexIndex = true;
f.supportsVertexIteration = true;
f.supportsVertexKeyIndex = true;
f.supportsVertexProperties = true;
f.supportsThreadIsolatedTransactions = false;
}
return f;
return AccumuloFeatures.get();
}
@Override