Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Sample data and other ur ls


Published on

  • Be the first to comment

  • Be the first to like this

Sample data and other ur ls

  1. 1. SAMPLE DATA as N3: @prefix mged: <> . @prefix demo: <> . @prefix example: <> . example:Mark a demo:PatientData; mged:has_height "1.93"; demo:has_mass "96". example:Jerven a demo:PatientData; mged:has_height "2.00"; demo:has_mass "85". SAMPLE DATA as XML: <rdf:RDF xmlns:rdf="" xmlns:mged="" xmlns:demo="" > <rdf:Description rdf:about=""> <mged:has_height>2.00</mged:has_height> <demo:has_mass>85</demo:has_mass> <rdf:type rdf:resource=""/> </rdf:Description> <rdf:Description rdf:about=""> <demo:has_mass>96</demo:has_mass> <rdf:type rdf:resource=""/> <mged:has_height>1.93</mged:has_height> </rdf:Description> </rdf:RDF> See your service definition
  2. 2. -- note that, because of annoying peculiarities in how Chrome handles certain XML content-types, it is necessary (for humans) to view this in Firefox, so that the XSLT transform is triggered correctly… Grrrrrr Execute from command line: curl -H 'Content-Type: text/rdf+n3' -H 'Accept: text/rdf+n3' -i --data-binary @tutorialsampledata.n3 '' Register the service (there is a REST interface you can use for bulk registrations, but you don’t get a lot of feedback on failure…) Copy of XML sample data at: (for use in SPARQL queries) Ontology: <rdf:RDF xmlns:rdf="" xmlns:rdfs="" xmlns:demo=""
  3. 3. xmlns:mged="" xmlns:owl=""> <owl:DatatypeProperty rdf:about=""> </owl:DatatypeProperty> <owl:DatatypeProperty rdf:about=" rial.owl#has_mass"> </owl:DatatypeProperty> <owl:DatatypeProperty rdf:about=""> </owl:DatatypeProperty> <owl:Class rdf:ID="PatientData"> <owl:intersectionOf rdf:parseType="Collection"> <owl:Restriction> <owl:onProperty rdf:resource=""/> <owl:minCardinality rdf:datatype="">1</owl:minCardinality> </owl:Restriction> <owl:Restriction> <owl:onProperty rdf:resource=""/> <owl:minCardinality rdf:datatype="">1</owl:minCardinality> </owl:Restriction> </owl:intersectionOf> </owl:Class> <owl:Class rdf:ID="PatientBMI"> <owl:equivalentClass> <owl:Restriction> <owl:onProperty rdf:resource=""/> <owl:someValuesFrom rdf:resource=""/> </owl:Restriction> </owl:equivalentClass> </owl:Class> </rdf:RDF> SPARQL Query for SHARE ( SELECT * FROM <> WHERE { ?s <> ?val } Have a look at this: Use that in your “FROM” clause… SHARE is using DL reasoning to automatically discover and rdf:type the input data for the service!
  4. 4. Dynamic match-making between “generic” RDF data and appropriate service interfaces. Also look at this: curl -H 'Content-Type: text/rdf+n3' -H 'Accept: application/n-quads' -i --data-binary @tutorialsampledata.n3 ''