use of org.codice.alliance.nsili.common.UCO.Node in project alliance by codice.
the class ResultDAGConverter method addDateAttribute.
public static void addDateAttribute(DirectedAcyclicGraph<Node, Edge> graph, Node parentNode, String key, Date date, ORB orb) {
Any any = orb.create_any();
AbsTimeHelper.insert(any, getAbsTime(date));
Node node = new Node(0, NodeType.ATTRIBUTE_NODE, key, any);
graph.addVertex(node);
graph.addEdge(parentNode, node);
}
use of org.codice.alliance.nsili.common.UCO.Node in project alliance by codice.
the class ResultDAGConverter method addExploitationInfoPart.
public static List<String> addExploitationInfoPart(DirectedAcyclicGraph<Node, Edge> graph, Node partNode, Metacard metacard, ORB orb, String parentAttrName, List<String> resultAttributes) {
List<String> addedAttributes = new ArrayList<>();
Any exploitationInfoAny = orb.create_any();
Node exploitationInfoNode = new Node(0, NodeType.ENTITY_NODE, NsiliConstants.NSIL_EXPLOITATION_INFO, exploitationInfoAny);
graph.addVertex(exploitationInfoNode);
graph.addEdge(partNode, exploitationInfoNode);
String attribute = parentAttrName + NsiliConstants.NSIL_EXPLOITATION_INFO;
addIntAttribute(graph, metacard.getAttribute(Isr.EXPLOITATION_LEVEL), orb, resultAttributes, addedAttributes, exploitationInfoNode, attribute, NsiliConstants.LEVEL);
addAutoGeneratedAttribute(graph, metacard, orb, resultAttributes, addedAttributes, exploitationInfoNode, attribute);
addSubjQualityAttribute(graph, metacard, orb, resultAttributes, addedAttributes, exploitationInfoNode, attribute);
if (addedAttributes.isEmpty()) {
graph.removeEdge(partNode, exploitationInfoNode);
graph.removeVertex(exploitationInfoNode);
}
return addedAttributes;
}
use of org.codice.alliance.nsili.common.UCO.Node in project alliance by codice.
the class ResultDAGConverter method addCoverageNodeWithAttributes.
public static List<String> addCoverageNodeWithAttributes(DirectedAcyclicGraph<Node, Edge> graph, Node partNode, Metacard metacard, ORB orb, String parentAttrName, List<String> resultAttributes) {
List<String> addedAttributes = new ArrayList<>();
Any any = orb.create_any();
String attribute = parentAttrName + NsiliConstants.NSIL_COVERAGE;
Node coverageNode = new Node(0, NodeType.ENTITY_NODE, NsiliConstants.NSIL_COVERAGE, any);
if (metacardContainsGeoInfo(metacard)) {
graph.addVertex(coverageNode);
graph.addEdge(partNode, coverageNode);
addStrAttribute(graph, metacard.getAttribute(Core.LOCATION), orb, resultAttributes, addedAttributes, coverageNode, attribute, NsiliConstants.ADVANCED_GEOSPATIAL);
addSpatialGeoRefBoxAttribute(graph, metacard, orb, resultAttributes, addedAttributes, attribute, coverageNode);
}
addTemporalAttributes(graph, metacard, orb, resultAttributes, addedAttributes, attribute, coverageNode);
addValStrAttribute(graph, metacard.getAttribute(Location.COUNTRY_CODE), orb, resultAttributes, addedAttributes, coverageNode, attribute, NsiliConstants.SPATIAL_COUNTRY_CODE);
return addedAttributes;
}
use of org.codice.alliance.nsili.common.UCO.Node in project alliance by codice.
the class ResultDAGConverter method addShortAttribute.
public static void addShortAttribute(DirectedAcyclicGraph<Node, Edge> graph, Node parentNode, String key, Short shortVal, ORB orb) {
Any any = orb.create_any();
any.insert_short(shortVal);
Node node = new Node(0, NodeType.ATTRIBUTE_NODE, key, any);
graph.addVertex(node);
graph.addEdge(parentNode, node);
}
use of org.codice.alliance.nsili.common.UCO.Node in project alliance by codice.
the class ResultDAGConverter method addRfiPart.
public static List<String> addRfiPart(DirectedAcyclicGraph<Node, Edge> graph, Node partNode, Metacard metacard, ORB orb, String parentAttrName, List<String> resultAttributes) {
List<String> addedAttributes = new ArrayList<>();
Any rfiAny = orb.create_any();
Node rfiNode = new Node(0, NodeType.ENTITY_NODE, NsiliConstants.NSIL_RFI, rfiAny);
graph.addVertex(rfiNode);
graph.addEdge(partNode, rfiNode);
String attribute = parentAttrName + NsiliConstants.NSIL_RFI;
addStrAttribute(graph, metacard.getAttribute(Isr.REQUEST_FOR_INFORMATION_FOR_ACTION), orb, resultAttributes, addedAttributes, rfiNode, attribute, NsiliConstants.FOR_ACTION);
addStrAttribute(graph, metacard.getAttribute(Isr.REQUEST_FOR_INFORMATION_FOR_INFORMATION), orb, resultAttributes, addedAttributes, rfiNode, attribute, NsiliConstants.FOR_INFORMATION);
addStrAttribute(graph, metacard.getAttribute(Isr.REQUEST_FOR_INFORMATION_SERIAL_NUMBER), orb, resultAttributes, addedAttributes, rfiNode, attribute, NsiliConstants.SERIAL_NUMBER);
addStatusAttribute(graph, metacard, orb, resultAttributes, addedAttributes, rfiNode, attribute);
addWorkflowStatusAttribute(graph, metacard, orb, resultAttributes, addedAttributes, rfiNode, attribute);
return addedAttributes;
}
Aggregations