Пример #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());
 }