private void populateResultUsingVisitor(List<OWLAxiom> result, OWLAxiomToTurtleVisitor visitor) {
   if (result != null) {
     for (OWLAxiom axiom : result) {
       axiom.accept(visitor);
     }
   }
 }
 /**
  * Convert.
  *
  * @param axiom axiom to convert
  * @return converted class expression
  */
 public OWLClassExpression convert(OWLAxiom axiom) {
   converter.reset();
   axiom.accept(converter);
   OWLClassExpression result = converter.getResult();
   if (result == null) {
     throw new RuntimeException("Not supported yet");
   }
   return result;
 }
 public void visit(OWLOntology ontology) {
   checkOccurrence(ontology.getAnnotations());
   for (AxiomType<?> t : AxiomType.AXIOM_TYPES) {
     for (OWLAxiom ax : ontology.getAxioms(t)) {
       checkOccurrence(ax.getAnnotations());
       ax.accept(this);
     }
   }
   singleAppearance.clear();
 }
 public Integer visit(OWLOntology ontology) {
   int max = _0;
   for (OWLAxiom axiom : ontology.getLogicalAxioms()) {
     int depth = axiom.accept(this);
     if (depth > max) {
       max = depth;
     }
   }
   return max;
 }
 private List<Construct> getOrderedConstructs() {
   constructs.clear();
   constructs.add(AL);
   for (OWLOntology ont : ontologies) {
     for (OWLAxiom ax : ont.getLogicalAxioms()) {
       ax.accept(this);
     }
   }
   pruneConstructs();
   List<Construct> cons = new ArrayList<Construct>(constructs);
   Collections.sort(cons, new ConstructComparator());
   return cons;
 }
 public Object getRelationshipType(Object parentObject, Object childObject) {
   AxiomEdge edge = new AxiomEdge(childObject, parentObject);
   OWLObject edgeObject = edgeMap.get(edge);
   if (edgeObject != null) {
     edgeNameGenerator.reset();
     if (edgeObject instanceof OWLClassExpression) {
       ((OWLClassExpression) edgeObject).accept(edgeNameGenerator);
     } else {
       ((OWLAxiom) edgeObject).accept(edgeNameGenerator);
     }
     return edgeNameGenerator.edgeName;
   } else {
     return null;
   }
 }
 public int getRelationshipDirection(Object parentObject, Object childObject) {
   AxiomEdge edge = new AxiomEdge(childObject, parentObject);
   OWLObject edgeObject = edgeMap.get(edge);
   if (edgeObject != null) {
     edgeNameGenerator.reset();
     if (edgeObject instanceof OWLAxiom) {
       ((OWLAxiom) edgeObject).accept(edgeNameGenerator);
     } else {
       ((OWLClassExpression) edgeObject).accept(edgeNameGenerator);
     }
     return edgeNameGenerator.direction;
   }
   return -1; // if no edge found, negative direction for handling in
   // DefaultEdgeFactory
 }
 private boolean isOBOAxiom(OWLAxiom axiom) {
   return axiom.accept(checker);
 }
 public AxiomType<?> getAxiomType(OWLAxiom axiom) {
   axiom.accept(this);
   return axiomType;
 }
 /**
  * This method clears all the map (invokes the clearMaps-method) at first. Then it iterates over
  * all axioms and invokes their accept-Method with "this" as parameter.
  *
  * @param axioms The axioms to visualize
  */
 public void addAndClearAxioms(Set<OWLAxiom> axioms) {
   this.clearMaps();
   for (OWLAxiom ax : axioms) {
     ax.accept(this);
   }
 }