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-dev] How to display the "property" on webprotege

mywbob mywbob at
Tue May 12 08:26:08 PDT 2015

Thank you Matthew. I tried your solution but it does not work...

Here is the file that I generated(I also edit something by hand..)



    <DatatypeProperty rdf:about="http://what/ever/row">


    <Class rdf:about="http://what/ever/athing">
                <onProperty rdf:resource="http://what/ever/row"/>

however, it does not work..

below is the java code I used...
public static OntModel createModel() throws Exception {
		String NS = "http://what/ever/";
		jenaModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);

		OntClass athing = jenaModel.createClass(NS + "athing");
		athing.addLabel("athing", null);
		String NNNS ="";
		Resource r1 = ResourceFactory.createResource(NNNS + "Thing");

		//data property
		DatatypeProperty row = jenaModel.createDatatypeProperty(NS + "row");
		row.addLabel("row", null);//lang is null, label is row

		String NNS = "";
		Resource r = ResourceFactory.createResource(NNS + "string");
		Property p = ResourceFactory.createProperty(NS + "bb");
		AllValuesFromRestriction avf1 =
jenaModel.createAllValuesFromRestriction(null, p, r);

		return jenaModel;

I tried to replace "p" in "jenaModel.createAllValuesFromRestriction(null, p,
r);" with "row". but the generated file looked like:

  <owl:Class rdf:about="http://what/ever/athing">
        <owl:onProperty> (this part looks wired to me)
          <owl:DatatypeProperty rdf:about="http://what/ever/row"/>
    <rdfs:subClassOf rdf:resource=""/>

The thing in owl:onProperty tag looks weird, so I used "p".  
The owl:onProperty tag is <onProperty rdf:resource="http://what/ever/bb"/>
if i do so. So I change
<onProperty rdf:resource="http://what/ever/bb"/> to <onProperty
rdf:resource="http://what/ever/row"/> by hand.

The file can be upload to webprotege, However, the "row" cannot be displayed
under the property section...

View this message in context:
Sent from the Protege Developer mailing list archive at

More information about the protege-dev mailing list