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] Usage of ManchesterOWLSyntaxEditor outside Protege

Keith Vander Linden kvlinden at calvin.edu
Fri Nov 26 15:11:55 PST 2010


Matthew Horridge <matthew.horridge <at> cs.man.ac.uk> writes:

> 
> Just to add to the discussion.....
> 
> There are some examples here that might be of use to you:
> 
> 
http://owlapi.svn.sourceforge.net/viewvc/owlapi/v3/trunk/examples/src/main/java/
org/coode/owlapi/examples/dlquery/
> 
> In particular:
> 
> 
http://owlapi.svn.sourceforge.net/viewvc/owlapi/v3/trunk/examples/src/main/java/
org/coode/owlapi/examples/dlquery/DLQueryParser.java?revision=1458&view=markup
> 
> Cheers,
> 
> Matthew


Matthew,

Thanks for this code reference. I'm doing a similar thing (i.e., building my own 
version of Protege's DL Query in a Java/OWLAPI application) but have found that 
the code you link above fails to parse numeric class expressions as I would 
expect. For example, Protege 4.1.0-213's DL Query interface parses the following 
expression properly:

Person and (hasAge some xsd:integer[>= 14])

but the DLQueryParser#parseClassExpression() linked above throws an error 
(copied below) when parsing it. I recall getting this error with an earlier 
version of Protege at one point. Could the example code you link have an old bug 
that has been fixed in the current version of Protege?

many thanks,

keith

The runtime error:

Exception in thread "main" 
org.semanticweb.HermiT.datatypes.UnsupportedFacetException: The 
'http://www.w3.org/2001/XMLSchema#minInclusive' facet takes only numbers as 
values when used on a datatype derived from owl:real, but the ontology contains 
a datatype restriction 
org.semanticweb.HermiT.datatypes.owlreal.OWLRealDatatypeHandler at ae8af4 where 14 
is not a number. 

	at 
org.semanticweb.HermiT.datatypes.owlreal.OWLRealDatatypeHandler.validateDatatype
Restriction(Unknown Source)
	at 
org.semanticweb.HermiT.datatypes.DatatypeRegistry.validateDatatypeRestriction(Un
known Source)
	at 
org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.visit(Unk
nown Source)
	at 
uk.ac.manchester.cs.owl.owlapi.OWLDatatypeRestrictionImpl.accept(OWLDatatypeRest
rictionImpl.java:108)
	at 
org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.convertDa
taRange(Unknown Source)
	at 
org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.visit(Unk
nown Source)
	at 
uk.ac.manchester.cs.owl.owlapi.OWLDataComplementOfImpl.accept(OWLDataComplementO
fImpl.java:89)
	at 
org.semanticweb.HermiT.structural.OWLClausification$DataRangeConverter.convertDa
taRange(Unknown Source)
	at 
org.semanticweb.HermiT.structural.OWLClausification$NormalizedAxiomClausifier.vi
sit(Unknown Source)
	at 
uk.ac.manchester.cs.owl.owlapi.OWLDataAllValuesFromImpl.accept(OWLDataAllValuesF
romImpl.java:65)
	at org.semanticweb.HermiT.structural.OWLClausification.clausify(Unknown 
Source)
	at org.semanticweb.HermiT.Reasoner.createDeltaDLOntology(Unknown Source)
	at org.semanticweb.HermiT.Reasoner.getTableau(Unknown Source)
	at org.semanticweb.HermiT.Reasoner.getHierarchyNode(Unknown Source)
	at org.semanticweb.HermiT.Reasoner.getSuperClasses(Unknown Source)
	at 
org.coode.owlapi.examples.dlquery.DLQueryEngine.getSuperClasses(DLQueryEngine.ja
va:51)
	at 
org.coode.owlapi.examples.dlquery.DLQueryPrinter.askQuery(DLQueryPrinter.java:46
)
	at 
org.coode.owlapi.examples.dlquery.DLQueryExample.main(DLQueryExample.java:57)





More information about the protege-owl mailing list