Search in sources :

Example 1 with EntityGraph

use of org.codice.alliance.nsili.common.UCO.EntityGraph in project alliance by codice.

the class DataModelMgrImplTest method testGetEntities.

@Test
public void testGetEntities() throws InvalidInputParameter, SystemFault, ProcessingFault {
    EntityGraph graph = dataModelMgr.get_entities(NsiliConstants.NSIL_ALL_VIEW, null);
    assertThat(graph, notNullValue());
}
Also used : EntityGraph(org.codice.alliance.nsili.common.UCO.EntityGraph) Test(org.junit.Test)

Example 2 with EntityGraph

use of org.codice.alliance.nsili.common.UCO.EntityGraph in project alliance by codice.

the class NsiliDataModel method initGmtiViewGraph.

private void initGmtiViewGraph() {
    EntityRelationship productPartRln = new EntityRelationship(productNode.id, partNode.id, Cardinality.ONE_TO_ONE, Cardinality.ONE_TO_ONE);
    EntityNode[] viewNodes = new EntityNode[] { productNode, cardNode, commonNode, coverageNode, fileNode, gmtiNode, metadataSecurityNode, partNode, relatedFileNode, relationNode, securityNode, streamNode, approvalNode, exploitationNode, sourceNode, destinationNode, associationNode };
    EntityRelationship[] viewRelationships = new EntityRelationship[] { productAssociationRln, productApprovalRln, productCardRln, productFileRln, productStreamRln, productMetadataSecurityRln, productRelatedFileRln, productSecurityRln, productPartRln, partCommonRln, partCoverageRln, partSecurityRln, partExploitationRln, partGmtiRln, assocCardRln, assocSourceRln, assocDestRln, assocRelationRln, sourceCardRln, destCardRln };
    viewGraphMap.put(NsiliConstants.NSIL_GMTI_VIEW, new EntityGraph(viewNodes, viewRelationships));
    List<Pair<ConceptualAttributeType, String>> conceptualPairs = new ArrayList<>();
    conceptualPairs.add(classificationPair);
    conceptualPairs.add(dataSetTypePair);
    conceptualPairs.add(dataSizePair);
    conceptualPairs.add(directAccessPair);
    conceptualPairs.add(footprintPair);
    conceptualPairs.add(modificationDatePair);
    conceptualPairs.add(productTitlePair);
    conceptualPairs.add(uniqueIdPair);
    conceptualAttrMap.put(NsiliConstants.NSIL_GMTI_VIEW, conceptualPairs);
    updateMandatoryAttrs(NsiliConstants.NSIL_GMTI_VIEW, viewNodes);
}
Also used : EntityGraph(org.codice.alliance.nsili.common.UCO.EntityGraph) EntityRelationship(org.codice.alliance.nsili.common.UCO.EntityRelationship) ArrayList(java.util.ArrayList) EntityNode(org.codice.alliance.nsili.common.UCO.EntityNode) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) Pair(org.apache.commons.lang3.tuple.Pair)

Example 3 with EntityGraph

use of org.codice.alliance.nsili.common.UCO.EntityGraph in project alliance by codice.

the class NsiliDataModel method initCbrnViewGraph.

private void initCbrnViewGraph() {
    EntityRelationship productPartRln = new EntityRelationship(productNode.id, partNode.id, Cardinality.ONE_TO_ONE, Cardinality.ONE_TO_ONE);
    EntityNode[] viewNodes = new EntityNode[] { productNode, approvalNode, cardNode, metadataSecurityNode, relatedFileNode, partNode, securityNode, commonNode, coverageNode, cbrnNode, associationNode, relationNode, sourceNode, destinationNode };
    EntityRelationship[] viewRelationships = new EntityRelationship[] { productApprovalRln, productCardRln, productFileRln, productMetadataSecurityRln, productRelatedFileRln, productSecurityRln, productPartRln, partCommonRln, partCoverageRln, partCbrnRln, assocCardRln, assocSourceRln, assocDestRln, assocRelationRln, sourceCardRln, destCardRln };
    viewGraphMap.put(NsiliConstants.NSIL_CBRN_VIEW, new EntityGraph(viewNodes, viewRelationships));
    List<Pair<ConceptualAttributeType, String>> conceptualPairs = new ArrayList<>();
    conceptualPairs.add(classificationPair);
    conceptualPairs.add(dataSetTypePair);
    conceptualPairs.add(dataSizePair);
    conceptualPairs.add(directAccessPair);
    conceptualPairs.add(footprintPair);
    conceptualPairs.add(modificationDatePair);
    conceptualPairs.add(productTitlePair);
    conceptualPairs.add(uniqueIdPair);
    conceptualAttrMap.put(NsiliConstants.NSIL_CBRN_VIEW, conceptualPairs);
}
Also used : EntityGraph(org.codice.alliance.nsili.common.UCO.EntityGraph) EntityRelationship(org.codice.alliance.nsili.common.UCO.EntityRelationship) ArrayList(java.util.ArrayList) EntityNode(org.codice.alliance.nsili.common.UCO.EntityNode) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) Pair(org.apache.commons.lang3.tuple.Pair)

Example 4 with EntityGraph

use of org.codice.alliance.nsili.common.UCO.EntityGraph in project alliance by codice.

the class NsiliDataModel method initAssociationViewGraph.

private void initAssociationViewGraph() {
    EntityNode[] viewNodes = new EntityNode[] { cardNode, relationNode, sourceNode, destinationNode, associationNode };
    EntityRelationship[] viewRelationships = new EntityRelationship[] { assocCardRln, assocSourceRln, assocDestRln, assocRelationRln, sourceCardRln, destCardRln };
    viewGraphMap.put(NsiliConstants.NSIL_ASSOCIATION_VIEW, new EntityGraph(viewNodes, viewRelationships));
    List<Pair<ConceptualAttributeType, String>> conceptualPairs = new ArrayList<>();
    conceptualPairs.add(modificationDatePair);
    conceptualPairs.add(uniqueIdPair);
    conceptualAttrMap.put(NsiliConstants.NSIL_ASSOCIATION_VIEW, conceptualPairs);
    updateMandatoryAttrs(NsiliConstants.NSIL_ASSOCIATION_VIEW, viewNodes);
}
Also used : EntityGraph(org.codice.alliance.nsili.common.UCO.EntityGraph) EntityRelationship(org.codice.alliance.nsili.common.UCO.EntityRelationship) ArrayList(java.util.ArrayList) EntityNode(org.codice.alliance.nsili.common.UCO.EntityNode) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) Pair(org.apache.commons.lang3.tuple.Pair)

Example 5 with EntityGraph

use of org.codice.alliance.nsili.common.UCO.EntityGraph in project alliance by codice.

the class NsiliDataModel method initReportViewGraph.

private void initReportViewGraph() {
    EntityRelationship productPartRln = new EntityRelationship(productNode.id, partNode.id, Cardinality.ONE_TO_ONE, Cardinality.ONE_TO_ONE);
    EntityRelationship partReportRln = new EntityRelationship(partNode.id, reportNode.id, Cardinality.ONE_TO_ONE, Cardinality.ONE_TO_ONE);
    EntityNode[] viewNodes = new EntityNode[] { productNode, approvalNode, cardNode, commonNode, coverageNode, fileNode, metadataSecurityNode, partNode, relatedFileNode, relationNode, securityNode, approvalNode, exploitationNode, reportNode, sourceNode, destinationNode, associationNode, intrepNode, intsumNode, entityNode };
    EntityRelationship[] viewRelationships = new EntityRelationship[] { productApprovalRln, productCardRln, productAssociationRln, productFileRln, productMetadataSecurityRln, productRelatedFileRln, assocSourceRln, assocDestRln, assocRelationRln, sourceCardRln, destCardRln, productPartRln, partSecurityRln, partCommonRln, partCoverageRln, partExploitationRln, partReportRln, reportEntityRln, reportIntsumRln, reportIntrepRln };
    viewGraphMap.put(NsiliConstants.NSIL_REPORT_VIEW, new EntityGraph(viewNodes, viewRelationships));
    List<Pair<ConceptualAttributeType, String>> conceptualPairs = new ArrayList<>();
    conceptualPairs.add(classificationPair);
    conceptualPairs.add(dataSetTypePair);
    conceptualPairs.add(dataSizePair);
    conceptualPairs.add(directAccessPair);
    conceptualPairs.add(footprintPair);
    conceptualPairs.add(modificationDatePair);
    conceptualPairs.add(productTitlePair);
    conceptualPairs.add(uniqueIdPair);
    conceptualAttrMap.put(NsiliConstants.NSIL_REPORT_VIEW, conceptualPairs);
    updateMandatoryAttrs(NsiliConstants.NSIL_REPORT_VIEW, viewNodes);
}
Also used : EntityGraph(org.codice.alliance.nsili.common.UCO.EntityGraph) EntityRelationship(org.codice.alliance.nsili.common.UCO.EntityRelationship) ArrayList(java.util.ArrayList) EntityNode(org.codice.alliance.nsili.common.UCO.EntityNode) ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) Pair(org.apache.commons.lang3.tuple.Pair)

Aggregations

EntityGraph (org.codice.alliance.nsili.common.UCO.EntityGraph)12 ArrayList (java.util.ArrayList)11 EntityNode (org.codice.alliance.nsili.common.UCO.EntityNode)11 ImmutablePair (org.apache.commons.lang3.tuple.ImmutablePair)10 Pair (org.apache.commons.lang3.tuple.Pair)10 EntityRelationship (org.codice.alliance.nsili.common.UCO.EntityRelationship)10 AttributeInformation (org.codice.alliance.nsili.common.GIAS.AttributeInformation)1 Test (org.junit.Test)1