Ejemplo n.º 1
0
  @Override
  protected void printURI(PrintWriter out, ATermAppl c) {
    String str = null;

    if (c.equals(ATermUtils.TOP)) str = "owl:Thing";
    else if (c.equals(ATermUtils.BOTTOM)) str = "owl:Nothing";
    else if (ATermUtils.isPrimitive(c)) str = qnames.shortForm(c.getName());
    else str = c.toString();

    out.print(str);
  }
Ejemplo n.º 2
0
 @Override
 public OWLLiteral map(ATermAppl term) {
   String lexValue = ((ATermAppl) term.getArgument(0)).getName();
   ATermAppl lang = (ATermAppl) term.getArgument(1);
   ATermAppl dtype = (ATermAppl) term.getArgument(2);
   if (dtype.equals(ATermUtils.PLAIN_LITERAL_DATATYPE)) {
     if (lang.equals(ATermUtils.EMPTY)) return factory.getOWLLiteral(lexValue);
     else return factory.getOWLLiteral(lexValue, lang.toString());
   } else {
     OWLDatatype datatype = DT_MAPPER.map(dtype);
     return factory.getOWLLiteral(lexValue, datatype);
   }
 }