Persistence of polymorphism relationships

24 views
Skip to first unread message

Victor M.

unread,
Apr 29, 2015, 11:24:55 AM4/29/15
to empir...@googlegroups.com
Hello there,

in am inheritance structure like the following:

@RdfsClass("zoo:Animal")
@MappedSuperclass
public class Animal implements SupportsRdfId
{}

@Entity
@RdfsClass("zoo:Axolotl")
public class Axolotl extends
{}

I would like to persist relationships in OpenRDF Sesame such as zoo:Axolotl rdfs:subClassOf zoo:Animal or <AxolotlResource> rdf:type zoo:Animal. Is this supported by Empire RDF or manual declarations of such statements would be required?


Best regards,
Victor M.

Michael Grove

unread,
Apr 29, 2015, 11:27:07 AM4/29/15
to empir...@googlegroups.com
To read an individual into a bean, it *must* be of the type specified in the @RdfsClass annotation.  Whether that information is explicit or inferred does not matter.

Cheers,

Mike
 


Best regards,
Victor M.

--
You received this message because you are subscribed to the Google Groups "Empire" group.
To unsubscribe from this group and stop receiving emails from it, send an email to empire-rdf+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Victor M.

unread,
Apr 29, 2015, 11:38:33 AM4/29/15
to empir...@googlegroups.com
Oh, so if I persist an Axolotl instance into the database, no information that Axolotls are Animals or that this specific Axolotl instance is of type Animal will be persisted then.

Michael Grove

unread,
Apr 29, 2015, 11:40:09 AM4/29/15
to empir...@googlegroups.com
No.  Empire only stores explicit information.  it's the job of the database to infer information.

Victor M.

unread,
Apr 29, 2015, 11:44:56 AM4/29/15
to empir...@googlegroups.com
I see. Thank you very much. :)
Reply all
Reply to author
Forward
0 new messages