[Pellet-users] datatype and object properties
Michael Smith
msmith at clarkparsia.com
Wed May 28 14:11:27 UTC 2008
On Tue, 2008-05-27 at 17:52 +0200, Christina Tziviskou wrote:
> I'm using the Pellet API:
>
> // Creation of the data property
> kb.addDatatypeProperty(ATermUtils.makeTermAppl(datatypeProperty));
>
> // Creation of the datatype
> kb.addDatatype("http://schema.omg.org/spec/UML/2.0/uml.xml#String",
> XSDString.instance);
>
> // Creation of the domain class
> kb.addClass(domainClass);
>
> // Retrieval of the datatype
> rangeDatatype = kb.getDatatypeReasoner().getDatatype((ATermAppl)
> ATermUtils.term("http://schema.omg.org/spec/UML/2.0/uml.xml#String"));
>
> // Creation of its type
> kb.addEquivalentClass(domainClass, ATermUtils.makeSomeValues(
> datatypeProperty, (ATermAppl) rangeDatatype.getName()));
>
> Is this the right way?
The call to getDatatype is unnecessary, but shouldn't be a problem.
> Because later, I cannot retrieve the property of a given type (datatype).
I don't understand what your trying to retrieve. Can you provide code
for the query?
--
Mike Smith
Clark & Parsia
More information about the Pellet-users
mailing list