提交 0d4e7f31 编写于 作者: M Mathieu Bastian

Adapt processors to take graph timestamp/interval in account

上级 66977079
......@@ -136,6 +136,13 @@ public abstract class AbstractProcessor {
flushTimeSet(nodeDraft.getTimeSet(), node);
}
//Graph timeset
if (nodeDraft.getGraphTimestamp() != null) {
node.addTimestamp(nodeDraft.getGraphTimestamp());
} else if (nodeDraft.getGraphInterval() != null) {
node.addInterval(nodeDraft.getGraphInterval());
}
//Attributes
flushToElementAttributes(nodeDraft, node);
}
......@@ -151,6 +158,12 @@ public abstract class AbstractProcessor {
for (int i = 0; i < keys.length; i++) {
existingMap.put(keys[i], vals[i]);
}
} else if (col.isDynamic() && (elementDraft.getGraphInterval() != null || elementDraft.getGraphTimestamp() != null)) {
if (elementDraft.getGraphTimestamp() != null) {
element.setAttribute(col.getId(), val, elementDraft.getGraphTimestamp());
} else if (elementDraft.getGraphInterval() != null) {
element.setAttribute(col.getId(), val, elementDraft.getGraphInterval());
}
} else {
element.setAttribute(col.getId(), val);
}
......@@ -190,6 +203,13 @@ public abstract class AbstractProcessor {
flushTimeSet(edgeDraft.getTimeSet(), edge);
}
//Graph timeset
if (edgeDraft.getGraphTimestamp() != null) {
edge.addTimestamp(edgeDraft.getGraphTimestamp());
} else if (edgeDraft.getGraphInterval() != null) {
edge.addInterval(edgeDraft.getGraphInterval());
}
//Attributes
flushToElementAttributes(edgeDraft, edge);
}
......
......@@ -110,7 +110,7 @@ public class DefaultProcessor extends AbstractProcessor implements Processor {
Configuration configuration = new Configuration();
configuration.setTimeRepresentation(container.getTimeRepresentation());
if (container.getEdgeTypeLabelClass() != null) {
// configuration.setEdgeLabelType(container.getEdgeTypeLabelClass());
configuration.setEdgeLabelType(container.getEdgeTypeLabelClass());
}
configuration.setNodeIdType(container.getElementIdType().getTypeClass());
configuration.setEdgeIdType(container.getElementIdType().getTypeClass());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册