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