Ejemplo n.º 1
0
 @Override
 public void visit(SequenceAnnotation annotation) {
   super.visit(annotation);
   add(annotation);
   if (duplicates.contains(annotation.getSubComponent())) {
     annotation.setSubComponent(map(annotation.getSubComponent()));
   }
 }
Ejemplo 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());
 }
Ejemplo 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;
 }
Ejemplo 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);
 }
Ejemplo n.º 5
0
 @Override
 public void visit(DnaSequence sequence) {
   super.visit(sequence);
   add(sequence);
 }
Ejemplo n.º 6
0
 @Override
 public void visit(Collection coll) {
   super.visit(coll);
   add(coll);
   removeDuplicates(coll.getComponents());
 }
Ejemplo n.º 7
0
 @Override
 public void visit(SBOLDocument doc) {
   super.visit(doc);
   removeDuplicates(doc.getContents());
 }