Datatype d = (Datatype) o;
String feature = factory.lookupFeatureId(d.getFeature());
AbstractLiteral literal = d.getLiteral();
if(literal instanceof DateLiteral) {
return new au.csiro.ontology.model.Datatype(new NamedFeature(feature), d.getOperator(),
new au.csiro.ontology.model.DateLiteral(((DateLiteral) literal).getValue()));
} else if(literal instanceof DecimalLiteral) {
return new au.csiro.ontology.model.Datatype(new NamedFeature(feature), d.getOperator(),
new au.csiro.ontology.model.DecimalLiteral(((DecimalLiteral) literal).getValue()));
} else if(literal instanceof IntegerLiteral) {
return new au.csiro.ontology.model.Datatype(new NamedFeature(feature), d.getOperator(),
new au.csiro.ontology.model.IntegerLiteral(((IntegerLiteral) literal).getValue()));
} else if(literal instanceof StringLiteral) {
return new au.csiro.ontology.model.Datatype(new NamedFeature(feature), d.getOperator(),
new au.csiro.ontology.model.StringLiteral(((StringLiteral) literal).getValue()));
} else {
throw new RuntimeException("Unexpected literal " + literal.getClass().getName());
}