code: public static Literal getLiteral(ValueConstant literal)
  	{
          Objects.requireNonNull(literal);
  		TermType type = literal.getType();
  		if (!(type instanceof RDFDatatype))
  			// TODO: throw a proper exception
  			throw new IllegalStateException("A ValueConstant given to OWLAPI must have a RDF datatype");
  		RDFDatatype datatype = (RDFDatatype) type;
  
  		return datatype.getLanguageTag()
  				.map(lang -> fact.createLiteral(literal.getValue(), lang.getFullString()))
  				.orElseGet(() -> fact.createLiteral(literal.getValue(),
  						fact.createIRI(datatype.getIRI().getIRIString())));
  	}
docs: TODO: could we have a RDF sub-class of ValueConstant?