use of org.sbolstandard.core.datatree.NestedDocument in project libSBOLj by SynBioDex.
the class SBOLWriter method formatInteractions.
/**
* formatInteractions for Module
* @param interactions
* @param properties
*/
private static void formatInteractions(Set<Interaction> interactions, List<NamedProperty<QName>> properties) {
for (Interaction i : interactions) {
List<NamedProperty<QName>> list = new ArrayList<>();
formatCommonIdentifiedData(list, i);
for (URI type : i.getTypes()) {
list.add(NamedProperty(Sbol2Terms.Interaction.type, type));
}
List<NestedDocument<QName>> participantList = formatParticipations(i.getParticipations());
for (NestedDocument<QName> n : participantList) {
list.add(NamedProperty(Sbol2Terms.Interaction.hasParticipations, n));
}
properties.add(NamedProperty(Sbol2Terms.ModuleDefinition.hasInteractions, NestedDocument(Sbol2Terms.Interaction.Interaction, i.getIdentity(), NamedProperties(list))));
}
}
Aggregations