--
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.
Hello there,
after fiddling with the code, it seems that the problem could be with inheritance (using one of the provided classes in the example works). The aforementioned User class has the following annotations:
@Namespaces({"sgr", "http://sgr#"})
@RdfsClass("sgr:User")
@Entity
public class User extends DatabaseMappingBasicClass
[...]
Inheriting from a superclass "DatabaseMappingBasicClass" with the following annotations.
@Namespaces({"sgr", "http://sgr#"})
@MappedSuperclass
public abstract class DatabaseMappingBasicClass implements SupportsRdfId
[...]
Is there anything missing/strange in those annotations?
--
Hi there,
it seems that my code sometimes deal with actual instances of a specific class and sometimes it deals with the Empire generated *Impl classes. When does the actual transformation from XImpl to X occur and is there any way to force this transformation? The code I have inherited uses a lot of conditionals that depend on class names, so I would like to avoid a workaround by editing the string directly.
--
Hi, thanks once again for the response.
The following query is an example of a typical operation done in the code I have here:String queryString = "SELECT DISTINCT ?result WHERE { ?result rdf:type sgr:BusinessObject. }";
// remove PREFIX declarations since createQuery breaks otherwise.
int index = queryString.indexOf("SELECT DISTINCT");
queryString = queryString.substring( index, queryString.length() );
Query query = em.createQuery( queryString );
query.setHint(RdfQuery.HINT_ENTITY_CLASS, classType);
list = query.getResultList();
Is there any way to provide this interface using a string-based query?