Hi all,

Scott, Irene, thanks for the replies.

Currently our model is not so complex. We have a file with concepts,
one with properties, one with abbreviations of concepts and several
thesauri imports.
The concept file had structure with several top level branches. Each
branch goes quite deep, up to ten levels sometimes. Many concepts also
have multiple parents.

What I had done is split the file with concepts by deleting all the
top branches except ones. Save that as a different file and start over
for the other branches using the original file. That worked however a
lot of lines in the raw data, looked at using a text editor, should
not be there but in another file. Also I saw that concepts that were
previously deleted from the model still left some lines in the raw
data, although they were not show in TBC. For this reason I posted
this subject.

After the advice from Scott I took those separate files, opened the
branch to the bottom (leaf nodes) and selected all resources, put them
in the basket and add them to a new rdf file. I did this for all the
new files with a branch and it has worked. All files are clean now.
After importing all the model parts into one rdf gives the exact model
as before the split.

Kees

On Aug 12, 6:33 pm, "Irene Polikoff" <[email protected]> wrote:
> Hi Kees,
>
> Splitting is much harder than merging. Merging, of course, is practically no
> work at all, while splitting will require some rather detailed steps.
>
> There are multiple ways of accomplishing this including using the triple
> view in TBC which gives one a complete control over which triple goes where,
> but it is also extremely detailed, especially if the trees are deep.
>
> If this operation needs to be done multiple times, I would recommend
> automating it with a SPARQLMotion script. For a manual split, given the
> nature of the task, I would probably do something like this:
>
> Copy your file creating 4 identical files - 1, 2, 3 and 4. Open them in a
> text editor and give files 2, 3 and 4 different base URIs. For 
> examplewww.example.com/branchAfor file2. Open file 1 and delete all skos 
> concepts
> except for the parent of branches A, B and C. If the parent has any parents
> of its own, keep them as well. In other words, keep everything above the
> branches you are splitting. Save.
>
> Open file 2 in TBC. Import file 1 into file 2.
>
> Delete branch B  by running a query along these lines:
>
> DELETE {?s ?p ?o. ?s2 ?p ?s}
> WHERE {s skos:broader+ :B.
> ?s ?p ?o.
> OPTIONAL {?s2 ?p ?s}}
>
> Prior to doing the delete, run a CONSTRUCT query to see all triples that
> will be deleted and to confirm that you are deleting the right things.
>
> Do the same delete for branch C.
>
> Make :A skos:broader :common-parent.
>
> Repeat this for files 3 and 4 so that they only contain branches B and C
> respectively.
>
> This should work if there are no connections across the brunches. If there
> are, the queries and the process would need to be adjusted to preserve
> these.
>
> Regards,
>
> Irene
>
> -----Original Message-----From:[email protected]
>
> [mailto:[email protected]]on Behalf Of Scott Henninger
> Sent: Thursday, August 12, 2010 10:40 AM
> To: TopBraid Suite Users
> Subject: [topbraid-users] Re: Split SKOS model into multiple rdf SKOS files
>
> Kees; There is a general section on refactoring in Help > How to? >
> Refactor ontologies.  The specific section for this question is "Move
> resources between files", which gives a couple of options on how to do
> this.
>
> If this doesn't meet you needs, let us know.
>
> -- Scott
>
> On Aug 12, 8:12 am, DrKK <[email protected]> wrote:
> > Hi,
>
> > I have a model in SKOS and want to split the model in separate rdf
> > files. I would like to have all the newly created files having the
> > properties from the source file, but the toplevel instances separated.
> > So the new files have al the properties but separate branches. For
> > example, source has ABC, file 1, file 2, and file 3 have the branch A,
> > B and C respectively. What is the best way to do this?
>
> > thanks
>
> > Kees
>
> --
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email [email protected]
> To unsubscribe from this group, send email 
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/topbraid-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to