On Tue, Aug 20, 2013 at 6:18 PM, Lewis John Mcgibbney <[email protected]> wrote: > Hi All, > I get a results stream from Fuseki as follows > > SPARQL_Rresult.getModel() > > for clarity, then I do model.toString() the results stream looks like this > > <ModelCom {mheq:ModelTA_Horizontal_Belt_Conveyor @rdfs:comment "The > ModelTA_Horizontal_Belt_Conveyor individual is a representation of the > product located a > http://www.gilmorekramer.com/more_info/hytrol_ta_conveyor/hytrol_ta_conveyor.shtml. > Data type propoerty associations are made in accordance with the power > calculation methodology located in "ENERGY MANAGEMENT > SERIES 17, FOR INDUSTRY COMMERCE AND INSTITUTIONS, Materials Handling and > On-Site Transportation Equipment, Canada."^^ > http://www.w3.org/2001/XMLSchema#string; > mheq:ModelTA_Horizontal_Belt_Conveyor @mheq:hasConveyorProductLoading > "36.0"^^http://www.w3.org/2001/XMLSchema#double; > mheq:ModelTA_Horizontal_Belt_Conveyor @mheq:hasConveyorLength "30.0"^^ > http://www.w3.org/2001/XMLSchema#double; > mheq:ModelTA_Horizontal_Belt_Conveyor @mheq:hasConveyorSpeed "0.508"^^ > http://www.w3.org/2001/XMLSchema#double; > mheq:ModelTA_Horizontal_Belt_Conveyor @rdf:type mheq:BeltConveyor; > mheq:ModelTA_Horizontal_Belt_Conveyor @rdf:type owl:NamedIndividual} | [ > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#ModelTA_Horizontal_Belt_Conveyor, > http://www.w3.org/2000/01/rdf-schema#comment, "The > ModelTA_Horizontal_Belt_Conveyor individual is a representation of the > product located a > http://www.gilmorekramer.com/more_info/hytrol_ta_conveyor/hytrol_ta_conveyor.shtml. > Data type propoerty associations are made in accordance with the power > calculation methodology located in "ENERGY MANAGEMENT > SERIES 17, FOR INDUSTRY COMMERCE AND INSTITUTIONS, Materials Handling and > On-Site Transportation Equipment, Canada."^^ > http://www.w3.org/2001/XMLSchema#string] [ > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#ModelTA_Horizontal_Belt_Conveyor, > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#hasConveyorProductLoading, > "36.0"^^http://www.w3.org/2001/XMLSchema#double] [ > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#ModelTA_Horizontal_Belt_Conveyor, > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#hasConveyorLength, > "30.0"^^http://www.w3.org/2001/XMLSchema#double] [ > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#ModelTA_Horizontal_Belt_Conveyor, > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#hasConveyorSpeed, > "0.508"^^http://www.w3.org/2001/XMLSchema#double] [ > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#ModelTA_Horizontal_Belt_Conveyor, > http://www.w3.org/1999/02/22-rdf-syntax-ns#type, > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#BeltConveyor] > [ > http://eil.stanford.edu:443/svn/eil-repo/Users/Lewis/ontology/MaterialHandlingEquipment.owl#ModelTA_Horizontal_Belt_Conveyor, > http://www.w3.org/1999/02/22-rdf-syntax-ns#type, > http://www.w3.org/2002/07/owl#NamedIndividual]> > > what I am interested here is the following > > #hasConveyorProductLoading, "36.0" > #hasConveyorLength, "30.0" > #hasConveyorSpeed, "0.508" > > I want to use the object data type values as input for an Apache CXF > Webservice. > What I wonder, is what methods I can use from Model [0] or ModelCon [1] to > just get the object values?
It's sort of surprising to me that you don't seem to care about what subjects those properties and values are attached to, but at any rate, if that's really what you want to do, then listObjectsOfProperty(Property) [1] is probably what you want. Call it with hasConveyorProductLoading and you'll get an NodeIterator that will return "36.0" to you, and similarly for the other properties and their values. //JT [1] http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/rdf/model/Model.html#listObjectsOfProperty(com.hp.hpl.jena.rdf.model.Property) -- Joshua Taylor, http://www.cs.rpi.edu/~tayloj/
