use of org.codice.alliance.nsili.common.GIAS.Association in project alliance by codice.
the class NsiliDataModel method initAssociations.
private void initAssociations() {
List<AttributeInformation> associationAttrs = new ArrayList<>();
associationAttrs.addAll(NsiliAttributesGenerator.getNsilCardAttributes());
associationAttrs.addAll(NsiliAttributesGenerator.getNsilRelationAttributes());
AttributeInformation[] associationAttrArray = associationAttrs.toArray(new AttributeInformation[0]);
Association hasPartAssoc = new Association(NsiliConstants.HAS_PART, NsiliConstants.NSIL_ALL_VIEW, NsiliConstants.NSIL_ALL_VIEW, "Described resource (e.g. 'Target Folder') includes the referenced resource either physically or logically.", Cardinality.MANY_TO_MANY, associationAttrArray);
Association isVersionAssoc = new Association(NsiliConstants.IS_VERSION_OF, NsiliConstants.NSIL_ALL_VIEW, NsiliConstants.NSIL_ALL_VIEW, "Described resource (source) is a version edition or adaptation of the referenced resource (destination). A change in version implies substantive changes in content rather than differences in format.", Cardinality.MANY_TO_ONE, associationAttrArray);
Association replacesAssoc = new Association(NsiliConstants.REPLACES, NsiliConstants.NSIL_ALL_VIEW, NsiliConstants.NSIL_ALL_VIEW, "Described resource (source) supplants, displaces or supersedes the referenced resource (destination).", Cardinality.ONE_TO_MANY, associationAttrArray);
Association isSupportDataToAssoc = new Association(NsiliConstants.IS_SUPPORT_DATA_TO, NsiliConstants.NSIL_ALL_VIEW, NsiliConstants.NSIL_ALL_VIEW, "Described resource (source) supplements information to the referenced RFI and IR (destination)", Cardinality.ONE_TO_MANY, associationAttrArray);
Association originatingFromAssoc = new Association(NsiliConstants.ORIGINATING_FROM, NsiliConstants.NSIL_ALL_VIEW, NsiliConstants.NSIL_ALL_VIEW, "Described resource (source) originates from referenced resource (destination) and thereby shows the hierarchical relationship between the two products.", Cardinality.MANY_TO_ONE, associationAttrArray);
Association followsAssoc = new Association(NsiliConstants.FOLLOWS, NsiliConstants.NSIL_ALL_VIEW, NsiliConstants.NSIL_ALL_VIEW, "Described resource (source in association) is the next in the chronological sequence after the referenced resource (destination in the association).", Cardinality.ONE_TO_ONE, associationAttrArray);
associations.add(hasPartAssoc);
associations.add(isVersionAssoc);
associations.add(replacesAssoc);
associations.add(isSupportDataToAssoc);
associations.add(originatingFromAssoc);
associations.add(followsAssoc);
}
use of org.codice.alliance.nsili.common.GIAS.Association in project alliance by codice.
the class NsiliDataModelTest method testAssociations.
@Test
public void testAssociations() {
List<Association> associations = nsiliDataModel.getAssociations();
assertThat(associations.size(), is(6));
for (Association association : associations) {
assertThat(association.attribute_info.length, is(12));
}
}
Aggregations