use of org.sbolstandard.core.datatree.Datatree.NamedProperty in project libSBOLj by SynBioDex.
the class SBOLWriter method formatSequenceAnnotations.
private static void formatSequenceAnnotations(Set<SequenceAnnotation> sequenceAnnotations, List<NamedProperty<QName>> properties) {
for (SequenceAnnotation s : sequenceAnnotations) {
List<NamedProperty<QName>> list = new ArrayList<>();
formatCommonIdentifiedData(list, s);
for (URI roles : s.getRoles()) {
list.add(NamedProperty(Sbol2Terms.SequenceAnnotation.roles, roles));
}
// }
for (Location location : s.getLocations()) {
list.add(getLocation(location));
}
if (s.isSetComponent())
list.add(NamedProperty(Sbol2Terms.SequenceAnnotation.hasComponent, s.getComponentURI()));
properties.add(NamedProperty(Sbol2Terms.ComponentDefinition.hasSequenceAnnotations, NestedDocument(Sbol2Terms.SequenceAnnotation.SequenceAnnotation, s.getIdentity(), NamedProperties(list))));
}
}
use of org.sbolstandard.core.datatree.Datatree.NamedProperty in project libSBOLj by SynBioDex.
the class SBOLWriter method formatComponents.
private static void formatComponents(Set<Component> components, List<NamedProperty<QName>> properties) {
for (Component s : components) {
List<NamedProperty<QName>> list = new ArrayList<>();
formatCommonIdentifiedData(list, s);
for (URI roles : s.getRoles()) {
list.add(NamedProperty(Sbol2Terms.Component.roles, roles));
}
if (s.isSetRoleIntegration()) {
list.add(NamedProperty(Sbol2Terms.Component.roleIntegration, RoleIntegrationType.convertToURI(s.getRoleIntegration())));
}
list.add(NamedProperty(Sbol2Terms.ComponentInstance.access, AccessType.convertToURI(s.getAccess())));
list.add(NamedProperty(Sbol2Terms.ComponentInstance.hasComponentDefinition, s.getDefinitionURI()));
List<NestedDocument<QName>> referenceList = getMapsTo(s.getMapsTos());
for (NestedDocument<QName> n : referenceList) {
list.add(NamedProperty(Sbol2Terms.ComponentInstance.hasMapsTo, n));
}
properties.add(NamedProperty(Sbol2Terms.ComponentDefinition.hasComponent, NestedDocument(Sbol2Terms.Component.Component, s.getIdentity(), NamedProperties(list))));
}
}
use of org.sbolstandard.core.datatree.Datatree.NamedProperty in project libSBOLj by SynBioDex.
the class SBOLWriter method formatCollections.
private static void formatCollections(Set<Collection> collections, List<TopLevelDocument<QName>> topLevelDoc) {
for (Collection c : collections) {
List<NamedProperty<QName>> list = new ArrayList<>();
formatCommonTopLevelData(list, c);
for (URI member : c.getMemberURIs()) {
list.add(NamedProperty(Sbol2Terms.Collection.hasMembers, member));
}
topLevelDoc.add(TopLevelDocument(Sbol2Terms.Collection.Collection, c.getIdentity(), NamedProperties(list)));
}
}
use of org.sbolstandard.core.datatree.Datatree.NamedProperty in project libSBOLj by SynBioDex.
the class SBOLWriter method formatVariableComponents.
private static void formatVariableComponents(Set<VariableComponent> variableComponents, List<NamedProperty<QName>> properties) {
for (VariableComponent variableComponent : variableComponents) {
List<NamedProperty<QName>> list = new ArrayList<>();
formatCommonIdentifiedData(list, variableComponent);
list.add(NamedProperty(Sbol2Terms.VariableComponent.hasVariable, variableComponent.getVariableURI()));
list.add(NamedProperty(Sbol2Terms.VariableComponent.hasOperator, OperatorType.convertToURI(variableComponent.getOperator())));
for (URI variant : variableComponent.getVariantURIs()) {
list.add(NamedProperty(Sbol2Terms.VariableComponent.hasVariants, variant));
}
for (URI variantCollection : variableComponent.getVariantCollectionURIs()) {
list.add(NamedProperty(Sbol2Terms.VariableComponent.hasVariantCollections, variantCollection));
}
for (URI variantDerivation : variableComponent.getVariantDerivationURIs()) {
list.add(NamedProperty(Sbol2Terms.VariableComponent.hasVariantDerivations, variantDerivation));
}
properties.add(NamedProperty(Sbol2Terms.CombinatorialDerivation.hasVariableComponent, NestedDocument(Sbol2Terms.VariableComponent.VariableComponent, variableComponent.getIdentity(), NamedProperties(list))));
}
}
use of org.sbolstandard.core.datatree.Datatree.NamedProperty in project libSBOLj by SynBioDex.
the class SBOLWriter method formatComponentDefinitions.
private static void formatComponentDefinitions(Set<ComponentDefinition> componentDefinitions, List<TopLevelDocument<QName>> topLevelDoc) {
for (ComponentDefinition c : componentDefinitions) {
List<NamedProperty<QName>> list = new ArrayList<>();
formatCommonTopLevelData(list, c);
for (URI types : c.getTypes()) {
list.add(NamedProperty(Sbol2Terms.ComponentDefinition.type, types));
}
for (URI roles : c.getRoles()) {
list.add(NamedProperty(Sbol2Terms.ComponentDefinition.roles, roles));
}
formatComponents(c.getComponents(), list);
formatSequenceAnnotations(c.getSequenceAnnotations(), list);
formatSequenceConstraints(c.getSequenceConstraints(), list);
for (URI sUri : c.getSequenceURIs()) formatSequence(sUri, list);
topLevelDoc.add(TopLevelDocument(Sbol2Terms.ComponentDefinition.ComponentDefinition, c.getIdentity(), NamedProperties(list)));
}
}
Aggregations