Working copy storage

46 views
Skip to first unread message

Oleksandr Mandryk

unread,
Jun 21, 2017, 9:33:49 AM6/21/17
to TopBraid Suite Users
Hi all,

I need to store some metadata related to the particular taxonomy. For this I've created SWP service with the query like this:
            <ui:update ui:updateQuery="{!
                    INSERT {
                        GRAPH ?currentGraph {
                            ?currentGraph &lt;http://topbraid.org/swa#test&gt; &quot;{= ?name}&quot; .
                        } .
                    }
                    WHERE {                        
                    } }"
/>
It works fine and I can see this after exporting the taxonomy to RDF or N-Triples.

But now I need to store similar (but independent) metadata for the working copy of the taxonomy and I would like it to be "visible" only inside the working copy.
[taxonomy graph] -> [working copy]
[metadata 1]            [metadata 2]

In addition I don't want to merge metadata from working copy to the main taxonomy after commit.

Could you please suggest the best way how to store such metadata for working copy?

Thank you.

Best regards,
Oleksandr Mandryk

Richard Cyganiak

unread,
Jun 21, 2017, 11:40:02 AM6/21/17
to topbrai...@googlegroups.com
Hi Oleksanr,

What you ask is difficult. Any data that is visible inside the working copy will be merged into the production copy on commit. I can’t think of an easy way to prevent certain triples from being carried over into the production copy.

An alternative might be to store the metadata in the team graph (.tch graph) associated with the project. That’s the graph where the working copies themselves, as well as the change history and other internal information is stored. The downside of that approach is that the metadata would not be visible in the working copy, but would have to be retrieved and displayed with a custom query.

Let’s assume that we have the URI of the project graph in ?projectGraph, and the URI of the working copy in ?tag, for example:

    ?projectGraph = <urn:x-evn-master:my_project>
    ?tag = <urn:x-tags:my_working_copy>

Then you could retrieve the URI of the team graph with the call

    teamwork:teamGraph(?projectGraph)

and do something like this to store the metadata (not tested):

    INSERT {
        GRAPH ?teamGraph {
            ?tag ex:myMetadataProperty "some value"
        }
    }
    WHERE {
        BIND (teamwork:teamGraph(?projectGraph) AS ?teamGraph)
    }

To retrieve and display the metadata for a given working copy, you would then have to do a corresponding SELECT query that reads from the team graph.

Hope that helps,
Richard



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

Oleksandr Mandryk

unread,
Jun 21, 2017, 4:33:38 PM6/21/17
to TopBraid Suite Users
Hi Richard,

thank you very much for your answer, it's very helpful!
I'll try to check it tomorrow, but looks like teamwork graph is what I'm looking for.

Could you tell me please, what is the best place to store some service data that should be available for all taxonomies with possibility to manage (add and edit) this data.

Thank you!

Best regards,
Oleksandr Mandryk

Holger Knublauch

unread,
Jun 21, 2017, 6:33:37 PM6/21/17
to topbrai...@googlegroups.com
On 22/06/2017 6:33, Oleksandr Mandryk wrote:
Hi Richard,

thank you very much for your answer, it's very helpful!
I'll try to check it tomorrow, but looks like teamwork graph is what I'm looking for.

Could you tell me please, what is the best place to store some service data that should be available for all taxonomies with possibility to manage (add and edit) this data.

For shared data, you can use the "global graph", which has the URI urn:x-evn-global

This is used, among others, to store Organizations.

HTH
Holger

Oleksandr Mandryk

unread,
Jun 22, 2017, 10:31:15 AM6/22/17
to TopBraid Suite Users
Hi Holger,

thank you!

Best regards,
Oleksandr Mandryk
Reply all
Reply to author
Forward
0 new messages