}
public EntityData getEntityData(OWLLiteral literal) {
P3LiteralParser literalParser = new P3LiteralParser(literal);
String p3Format = literalParser.formatP3Literal();
EntityData entityData = new EntityData(p3Format);
entityData.setBrowserText(p3Format);
// The UI seems a bit inconsistent in accepting ~# sometimes it returns it and other times it doesn't and it
// doesn't seem to accept it in places that return it.
OWLDatatype dt = literal.getDatatype();
if(dt.isInteger()) {
entityData.setValueType(ValueType.Integer);
}
else if(dt.isBoolean()) {
entityData.setValueType(ValueType.Boolean);
}
else if(dt.isDouble()) {
entityData.setValueType(ValueType.Float);
}
else if(dt.isFloat()) {
entityData.setValueType(ValueType.Float);
}
else if(dt.isString()) {
entityData.setValueType(ValueType.String);
}
else {
// Totally unsatisfactory
entityData.setValueType(ValueType.Any);
}
return entityData;
}