Hi Minto

Some time ago I implemented a small tool for Stanbol that allows to
create RDF Facades over Clerezza TripleCollections [1].

Facades are interfaces with RDF annotations (see [2] for examples).
Facades are used by

1. creating an instance of the RdfEntityFactory based on a Clerezza MGraph
2. creating instances of the facade by using the RdfEntityFactory

Here some sample code (see [3] for more examples)

MGraph graph; //the RDF data
RdfEntityFactory factory = RdfEntityFactory.createInstance(graph);

Iterator<Triple> textAnnotations =
grpah.filter(null,RDF.type,FISE.textAnnotation);
while(textAnnotations.hasNext()){
    UriRef uri = textAnnotations.next().getSubject();
    TextAnnotation textAnnotationFacade = factory.getProxy(
            uri, TextAnnotation.class);
}

I do not know CXF, but maybe if you annotate the Interfaces with both
the RDF and JAXB annotations it could work as requested.

best
Rupert

[1] http://svn.apache.org/repos/asf/stanbol/trunk/enhancer/generic/rdfentities/
[2] 
http://svn.apache.org/repos/asf/stanbol/trunk/enhancer/generic/rdfentities/src/main/java/org/apache/stanbol/enhancer/rdfentities/fise/
[4] 
http://svn.apache.org/repos/asf/stanbol/trunk/enhancer/generic/rdfentities/src/test/java/org/apache/stanbol/enhancer/rdfentities/fise/TestEnhancementInterfaces.java

On Tue, Jan 29, 2013 at 2:05 PM, Minto van der Sluis <[email protected]> wrote:
> Hi folks,
>
> I have the need to transform content of a triple collection into Java
> objects. Are there any tools present in Stanbol or Clerezza that can do
> this?
>
> I know of tools presented in http://semanticweb.org/wiki/Tripresso . But
> I wonder how well these tools work with Clerezza based triple collections.
>
> The following is just to give more context to why I need this.
>
> I created a pluggable RDF/Triples processing pipeline based on a number
> of Apache projects (Karaf, Clerezza, Stanbol, Cxf). One of the steps in
> this pipeline is sending notifications. One the notifiers is supposed to
> send data to a Soap based webservice. Now the ontology of the webservice
> (B) is completely different from the one of the original RDF data (A).
>
> Schematically I need to achieve the following:
>
>    triples (A) --> ....... --> xml (B)
>
> Some pieces of this puzzle are clear to me. But please correct me if a
> on the wrong path, since this matter is outside my comfort zone ;-)
>
> I used CXF to create a Soap client with Java object to xml mapping. In
> which CXF takes care of marshalling the xml (B). On the other side of
> this spectrum I see the use of Stanbol RuleStore combined with the
> Refactorer to translate the triples to B ontology. Schematically gives:
>
>    triples (A) --> triples (B) --> ....... --> Java (B) --> xml (B)
>
> Now I am looking for tools to support me for the final step to create
> Java objects from triples (B). Seems like most tools mentioned in
> http://semanticweb.org/wiki/Tripresso require me to modify the CXF
> generated Java classes. Which I will try to avoid if possible.
>
> Another alternative is to skip the java objects phase. But then I need
> to go straight from triples (B) to xml (B) (any tools for this?). In
> this scenario I also have to find out how to let CXF use xml (B) instead
> of java objects to fire of the Soap service call.
>
> Any additional input, other point of views or alternative solutions are
> highly appreciated.
>
> Regards,
>
> Minto
>
> --
> ir. ing. Minto van der Sluis
> Software innovator / renovator
> Xup BV
>
> BTW: I have karaf features components for both the Stanbol and Clerezza
> features used by me. These might be interesting for others.



-- 
| Rupert Westenthaler             [email protected]
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen

Reply via email to