use of org.ff4j.neo4j.FF4jNeo4jLabels in project ff4j by ff4j.
the class FeatureStoreNeo4J method addNeighBour2Feature.
/**
* Parse node related to feature and create sub component.
*
* @param targetFeature
* current feature
* @param nodeOther
* current neighbour
*/
private void addNeighBour2Feature(Feature targetFeature, Node nodeOther) {
Util.assertNotNull(targetFeature);
if (nodeOther != null && nodeOther.getLabels().iterator().hasNext()) {
String nodeLabel = nodeOther.getLabels().iterator().next().toString();
FF4jNeo4jLabels lblb = FF4jNeo4jLabels.valueOf(nodeLabel);
switch(lblb) {
case FF4J_FLIPPING_STRATEGY:
FlippingStrategy fs = fromNode2FlippingStrategy(targetFeature.getUid(), nodeOther);
targetFeature.setFlippingStrategy(fs);
break;
case FF4J_FEATURE_PROPERTY:
Property<?> ap = fromNode2Property(nodeOther);
targetFeature.getCustomProperties().put(ap.getName(), ap);
break;
case FF4J_FEATURE_GROUP:
targetFeature.setGroup((String) nodeOther.getProperty(NODEGROUP_ATT_NAME));
break;
default:
break;
}
}
}
Aggregations