Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] isValidType()

Tania Tudorache tudorache at
Wed Sep 13 11:14:48 PDT 2006


I agree with you, the way datatypes are implemented in Protege OWL can 
be improved. We are looking into that.
Until then, there is a solution to your problem.

Protege OWL wraps the datatype values (other than the core ones, string, 
float, boolean and int) into a RDFSLiteral. (See 

In order to set a long value for a datatype property with range 
xsd:long, you can use the following code:

        OWLIndividual ind = owlModel.getOWLIndividual("MyIndividual");
        OWLDatatypeProperty longProp = 
       //setting the value:     
DefaultRDFSLiteral.create(owlModel, new Long(555)));

        //getting the value:      
        RDFSLiteral retValLit = (RDFSLiteral) 
        long longValue = retValLit.getLong();
We will also update the documentation from the OWL Developers Guide.


james.wiley at wrote:

>What on earth is Protege doing with datatype properties?  I have specified a datatype property with range xsd:long, but when I try to use the OWL API to set the datatype property to a Long object, an exception is thrown.  I traced the problem to the isValidType method in ArgumentCheckingFrameStore which only accepts Float, String, Integer, Boolean or Frame.  Why would I be able to set the limit the type and not be able to set the property to that type?  There seems to be a serious mapping problem between valid XSD types and Java types.  What can I do to remedy this situation.  I have an ontology that requires the use of longs (and doubles) and currently they are not supported.
>protege-owl mailing list
>protege-owl at

More information about the protege-owl mailing list