Gerrick; I think it may be a good idea to first explain why the
imports won't work as you first thought.  Imports in Ensemble work
just like in Composer.  You can add an owl:imports triple to a file,
but you won't see the imported triples until you re-load the file.  So
once the file is saved (when using Personal Server you need to save in
TBC-ME) you can do a browser refresh in Ensemble and the imported
triples will appear.

To cover your requirement that allows users to select which parts of
the catalog to view, using owl:imports would not be a good choice, as
it will be a lot of work to tease out triples imported from various
files. Instead, view the catalog as a set of files and have the user
import individual files into Ensemble.  Basically this would be as
Holger said in an earlier post, use PerformUpdate to insert the
triples into http://tb-session, which contains the triples that
Ensemble has access to.

It is quite common for scripts to manipulate triples in various ways,
such as transformations of imported spreadsheets, the put all of those
triples in to tb-session via the following query:
  INSERT INTO <http://tb-session> {?s ?p ?o}
  WHERE {?s ?p ?o}

So, the basic outline of your application would be:
 - a component lists the files your users can add to the TBE session
 - choosing a file then "load" (or whatever you SPIN function names
it) will:
    - run the translation script
    - uses PerformUpdate to insert into http://tb-session

>From there, you can perform operations on http://tb-session, and the
users will get output from just the files they have chosen to load.
Give that a try, I think it will do what you need.

-- Scott

On Apr 18, 12:35 pm, Gerrick Bivins <[email protected]> wrote:
> Hi Irene,
> Sorry about that, I'll try to describe what we are attempting to do:
> 1) Open a graph in our ensemble application, think of this as a catalog
> 2) Provide a mechanism to allow our users to upload spreadsheets that
> contain instances of classes in our base ontology. These will be saved to a
> new rdf file (.owl at the moment) for simplicity lets assume one per
> spreadsheet.
> 3) After successful upload and translation described in 2, add the
> information from the rdf model created in step 2 to the catalog model that
> is open in ensemble. This I thought I could do by simply adding an import
> statement to the catalog model.
>
> The catalog is the main graph that a user will open our application with. We
> would like any user to be able to see any information that has been loaded
> to the catalog but also be able to not load everything referenced in the
> catalog, ie if the user only want to see the last two models loaded from
> spreadsheets, they could navigate to the rdf model representing those sheets
> and just load those two models rather than the entire catalog.
> I've over simplified here but that is the general idea.
>
> Gerrick
>
> On Sun, Apr 18, 2010 at 11:59 AM, Irene Polikoff <[email protected]>wrote:
>
>
>
> >  Gerrick,
>
> > Could you describe your use case in a bit more detail e.g., what does the
> > use do with the TBE application, what is being imported, should other users
> > see the imported information, etc.? Once we understand the overall workflow
> > we will be in a better position to give advice.
>
> > Irene
>
> > *From:* [email protected] [mailto:
> > [email protected]] *On Behalf Of *Gerrick Bivins
> > *Sent:* Sunday, April 18, 2010 9:59 AM
>
> > *To:* [email protected]
> > *Subject:* Re: [topbraid-users] Add import to currently open graph in
> > Ensemble application
>
> > Hi Holger,
>
> > I don't quite understand. If I run PerformUpdate intohttp://tb-session,
> > won't the new triples be added to the graph represented by
> >http://tb-sessionrather than the small model that I imported? It seems
> > like I'd want to run PerformUpdate but specify the <
> >http://my-imported-model> as the  graph. Anyway, I don't fully understand
> > the SPARQL Update spec so maybe that's where the confusion is coming in.
>
> > Gerrick
>
> > On Sat, Apr 17, 2010 at 5:30 PM, Holger Knublauch <[email protected]>
> > wrote:
>
> > Hi Gerrick,
>
> > there is no way to change the owl:imports of an Ensemble model at run-time.
> > This would complicate things like dictionaries and multi-user scenarios
> > considerably. However, you can simulate this behavior to a certain extent
> > using SPARQLMotion: Import the file you want to owl:import and then run an
> > sml:PerformUpdate of all triples from that model intohttp://tb-sessionto
> > add its triples like you would do other changes. Needless to say this
> > approach is only recommended for reasonably small models.
>
> > Holger
>
> > On Apr 18, 2010, at 7:12 AM, Gerrick Bivins wrote:
>
> >  Hello,
>
> > Is it possible to programmatically (via SM or ensemble sdk) add imports to
> > the currently open graph model in Ensemble?
>
> > Gerrick

-- 
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