This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# To query for all individuals that have an age between 18 and 37 (exclusive) | |
# in Pellet 2.0, you have to write (ignoring PREFIXes for now): | |
# | |
SELECT ?x | |
WHERE | |
{ ?x a [ a owl:Restriction ; | |
owl:onProperty :age ; | |
owl:someValuesFrom [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graph aGraph = new GraphImpl(); | |
URI aBook = aGraph.getValueFactory().createURI("urn:x-domain:oreilly.com:product:9780596514129.IP"); | |
aGraph.add(aBook, | |
aGraph.getValueFactory().createURI("http://purl.org/dc/terms/publisher"), | |
aGraph.getValueFactory().createLiteral("O'Reilly Media / Pogue Press")); | |
aGraph.add(aBook, | |
aGraph.getValueFactory().createURI("http://purl.org/dc/terms/title"), | |
aGraph.getValueFactory().createLiteral("Switching to the Mac: The Missing Manual, Leopard Edition")); | |
// ... setting the additional properties here ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Graph aGraph = new GraphImpl(); | |
URI aBook = aGraph.getValueFactory().createURI("urn:x-domain:oreilly.com:product:9780596514129.IP"); | |
aGraph.add(aBook, | |
aGraph.getValueFactory().createURI("http://purl.org/dc/terms/publisher"), | |
aGraph.getValueFactory().createLiteral("O'Reilly Media / Pogue Press")); | |
aGraph.add(aBook, | |
aGraph.getValueFactory().createURI("http://purl.org/dc/terms/title"), | |
aGraph.getValueFactory().createLiteral( | |
"Switching to the Mac: The Missing Manual, Leopard Edition")); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<rdf:Description rdf:about="urn:x-domain:oreilly.com:product:9780596514129.IP"> | |
<foaf1:primarySubjectOf rdf:resource="http://oreilly.com/catalog/9780596514129"/> | |
<dc1:title xml:lang="en">Switching to the Mac: The Missing Manual, Leopard Edition</dc1:title> | |
<dc1:title>Switching to the Mac: The Missing Manual, Leopard Edition</dc1:title> | |
<dc1:creator rdf:resource="urn:x-domain:oreilly.com:agent:pdb:350"/> | |
<dc1:publisher xml:lang="en">O'Reilly Media / Pogue Press</dc1:publisher> | |
<dc1:issued rdf:datatype="http://www.w3.org/2001/XMLSchema#date">2008-02-26</dc1:issued> | |
<frbr1:embodiment rdf:resource="urn:x-domain:oreilly.com:product:9780596514129.BOOK"/> | |
<frbr1:embodiment rdf:resource="urn:x-domain:oreilly.com:product:9780596802899.EBOOK"/> | |
<frbr1:embodiment rdf:resource="urn:x-domain:oreilly.com:product:9780596514129.SAF"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Book aBook = new Book(); | |
aBook.setTitle("Switching to the Mac: The Missing Manual, Leopard Edition"); | |
aBook.setPublisher("O'Reilly Media / Pogue Press"); | |
aBook.setIssueDate("2008-02-26"); | |
// And so on... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Namespaces({"frbr", "http://vocab.org/frbr/core#"}) | |
@Entity | |
@RdfsClass("frbr:Expression") | |
public class Book |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... annotations ... | |
public class Book implements SupportsRdfId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String title; | |
private String publisher; | |
private Date issued; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@OneToMany(fetch = FetchType.LAZY, | |
cascade = {CascadeType.PERSIST, CascadeType.MERGE}) | |
private Collection<Manifestation> mEmbodiments = new HashSet<Manifestation>(); |
OlderNewer