code: private String printInternalObject(Object o) {
          if(o instanceof Conjunction) {
              Conjunction con = (Conjunction)o;
              StringBuilder sb = new StringBuilder();
              AbstractConcept[] cons = con.getConcepts();
              if(cons != null && cons.length > 0) {
                  sb.append(printInternalObject(cons[0]));
                  for(int i = 1; i < cons.length; i++) {
                      sb.append(" + ");
                      sb.append(printInternalObject(cons[i]));
                  }
              }
              return sb.toString();
          } else if(o instanceof Existential) {
              Existential e = (Existential)o;
              AbstractConcept c = e.getConcept();
              int role = e.getRole();
              return factory.lookupRoleId(role)+"."+printInternalObject(c);
          } else if(o instanceof Datatype) {
              StringBuilder sb = new StringBuilder();
              Datatype d = (Datatype)o;
              String feature = factory.lookupFeatureId(d.getFeature());
              sb.append(feature.toString());
              sb.append(".(");
              AbstractLiteral literal = d.getLiteral();
              sb.append(literal);
              sb.append(")");
              return sb.toString();
          } else if(o instanceof Concept) {
              Object obj = factory.lookupConceptId(((Concept)o).hashCode());
              if(au.csiro.ontology.model.NamedConcept.TOP.equals(obj)) {
                  return "TOP";
              } else if(au.csiro.ontology.model.NamedConcept.BOTTOM.equals(obj)) {
                  return "BOTTOM";
              } else if(obj instanceof AbstractConcept) {
                  return "<"+printInternalObject(obj)+">";
              } else {
                  return obj.toString();
              }
          } else if(o instanceof Comparable<?>) {
              return o.toString();
          } else {
              throw new RuntimeException("Unexpected object with class "+
                      o.getClass().getName());
          }
      }
docs: Prints an object of the internal model using the string representation
  of the corresponding object in the external model.
  
  @param o
  @return