Skip to content

Instantly share code, notes, and snippets.

Kendall Clark kendall

Block or report user

Report or block kendall

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View empire-7.java
Book aBook = aManager.find(Book.class, URI.create("urn:x-domain:oreilly.com:product:9780596514129.IP"));
// prints: Switching to the Mac: The Missing Manual, Leopard Edition
System.err.println(aBook.getTitle());
// prints: O'Reilly Media / Pogue Press
System.err.println(aBook.getPublisher());
View empire-6.java
EntityManager aManager = Persistence.createEntityManagerFactory("oreilly")
.createEntityManager();
View empire-5.java
Empire.init(new OpenRdfEmpireModule());
View empire-4.java
@RdfProperty("dc:title")
private String title;
@RdfProperty("dc:publisher")
private String publisher;
@RdfProperty("dc:issued")
private Date issued;
@RdfProperty("frbr:embodiment")
View empire-3.java
@OneToMany(fetch = FetchType.LAZY,
cascade = {CascadeType.PERSIST, CascadeType.MERGE})
private Collection<Manifestation> mEmbodiments = new HashSet<Manifestation>();
View empire-2.java
private String title;
private String publisher;
private Date issued;
View rdf-id.java
// ... annotations ...
public class Book implements SupportsRdfId
View empire.java
@Namespaces({"frbr", "http://vocab.org/frbr/core#"})
@Entity
@RdfsClass("frbr:Expression")
public class Book
View jpa.java
@Entity
public class Book
View java-beans.java
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...
You can’t perform that action at this time.