java - Apache Jena - get all resources with property -
i'm facing problem , can't seem find solution in net. in project have rdf model various smartphones, described this:
<rdf:description rdf:about="https://lukasgorny.pro/devices#googlepixelxl2"> <device-name>google pixel xl2</device-name> <screen-size>big</screen-size> <primary-camera-resolution>13</primary-camera-resolution> </rdf:description>
is there way i'm able find devices in apache jena with, f.e. "screen-size" property set "big"? regards, lukas.
model m = rdfdatamgr.loadmodel("phones.rdf", lang.rdfxml); m.listresourceswithproperty(m.createproperty("screen-size"), m.createliteral("big")) .foreachremaining(system.out::println);
prints them console
Comments
Post a Comment