Exemplo n.º 1
0
 @Override
 public void visit(SequenceAnnotation annotation) {
   super.visit(annotation);
   add(annotation);
   if (duplicates.contains(annotation.getSubComponent())) {
     annotation.setSubComponent(map(annotation.getSubComponent()));
   }
 }
Exemplo n.º 2
0
 @Override
 public void visit(DnaComponent component) {
   super.visit(component);
   add(component);
   if (duplicates.contains(component)) {
     component.setDnaSequence(map(component.getDnaSequence()));
   }
   removeDuplicates(component.getAnnotations());
 }
Exemplo n.º 3
0
 @Override
 public void visit(DnaComponent component) {
   Map<URI, SequenceAnnotation> previous = current;
   current = new HashMap<URI, SequenceAnnotation>();
   for (SequenceAnnotation annotation : component.getAnnotations()) {
     current.put(annotation.getURI(), annotation);
   }
   super.visit(component);
   current = previous;
 }
Exemplo n.º 4
0
 @Override
 public void visit(SequenceAnnotation annotation) {
   for (PrecedeReference reference :
       ((SequenceAnnotationImpl) annotation).getPrecedeReferences()) {
     SequenceAnnotation sa = current.get(reference.resource);
     if (sa != null) {
       reference.setValue(sa);
     } else if (validate) {
       throw new SBOLValidationException(
           "Cannot resolve precede reference to sequence annotation: " + reference.resource);
     }
   }
   super.visit(annotation);
 }
Exemplo n.º 5
0
 @Override
 public void visit(DnaSequence sequence) {
   super.visit(sequence);
   add(sequence);
 }
Exemplo n.º 6
0
 @Override
 public void visit(Collection coll) {
   super.visit(coll);
   add(coll);
   removeDuplicates(coll.getComponents());
 }
Exemplo n.º 7
0
 @Override
 public void visit(SBOLDocument doc) {
   super.visit(doc);
   removeDuplicates(doc.getContents());
 }