Changing Namespace References in an Ontology

98 views
Skip to first unread message

Uschold, Michael F

unread,
May 16, 2007, 8:32:19 PM5/16/07
to topbraid-co...@googlegroups.com, david....@boeing.com
I loaded an ontology into TBC.

That ontology had some references to other namespaces (for simplicity, say just one called p1).
So the .owl file had various statements of this ilk:
 
...p1:foo...bar ...
 
Where foo is from namespace p1, and bar is from the default namespace.
 
I want to get rid of al the references to p1, and simply have all the names in one ontology using the base URI.
 
Currently, I have a not-small ontology and am trying in vain to get it right manually in emacs.
I don't know the gory details of rdf that well, and am having problems with whether to use the # or not, some instances are disappearing, etc.
 
There must be an easier way...
 
Is there a way to do this in TBC?
 
In general, this could be an issue when ontologies not created in TBC are imported into TBC.
Has anyone else any experience with this kind of issue?

Thanks
Michael
 

==========================
Michael Uschold
M&CT, Phantom Works
425 373-2845
michael....@boeing.com 
==========================

----------------------------------------------------
COOL TIP: to skip the phone menu tree and get a human on the phone, go to: http://gethuman.com/tips.html


 

Holger Knublauch

unread,
May 16, 2007, 10:41:03 PM5/16/07
to topbraid-co...@googlegroups.com, david....@boeing.com
Mike,

first off, I don't think this problem is specific to ontologies created
with other tools. I think it is a common good practice to have each
import use its own namespaces.

From your description it seems that you want to merge two (or more)
ontologies so that they all use the same namespace, and possibly also
reside in the same file. For this I see a 2-step procedure:

1) Align the namespaces. There is a batch operation in the basket that
allows you to change the namespace of all resources in the basket. So,
select all resources of the p1 namespace and drag them into the basket.
Then select "Perform batch operation" in the basket's drop down menu.
In the following wizard select the operation (Change namespace/prefix
is the only choice right now) and then select the target namespace.
This will rename all selected resources at once.

BTW, you may ask, how do I get all resources of the p1 namespace into
the basket. There are several options. For example select
rdfs:Resource in the Classes tree and configure the Instances View to
Show Indirect Instances. This will list all resource in your ontology.
Assuming it is sorted by Resource names, you can then select all p1:
resources. Alternatively, you can do similar tricks with the Triples
View, SPARQL view etc. With a bit of fantasy you will see that TBC has
several interesting features based on drag and drop and a clever use of
the basket.

2) If you then want to merge the resources from the other namespace into
your main file, either use the Triples view to drag and drop them, or
use the Export wizard (from the other mail thread) to create a file with
the union of the triples.

Let me know if this is not clear.
Holger

Uschold, Michael F

unread,
May 17, 2007, 2:52:20 PM5/17/07
to topbraid-co...@googlegroups.com, Jones, David H
Thanks. I would have to play around a bit to get this to work. Is any of
this documented?

Also, what IS a good way to see TBC documentation, separated from Eclips
documentation in the tool?

In the end, I finally managed to get the job done in emacs.
I will keep a note of your suggestions for a future need.

Thanks
Michael


==========================
Michael Uschold
M&CT, Phantom Works
425 373-2845
michael....@boeing.com
==========================

----------------------------------------------------
COOL TIP: to skip the phone menu tree and get a human on the phone, go
to: http://gethuman.com/tips.html

Holger Knublauch

unread,
May 17, 2007, 3:41:23 PM5/17/07
to topbraid-co...@googlegroups.com

Uschold, Michael F wrote:
> Thanks. I would have to play around a bit to get this to work. Is any of
> this documented?

Yes, but shattered across multiple pages on the manual. In particular
the Basket View page has the reference to the change namespace
operation. I guess is that it would make sense to put this whole story
into our tutorial.


> Also, what IS a good way to see TBC documentation, separated from Eclipse
> documentation in the tool?

When you open Help > Help Contents and then open TopBraid Composer in
the help tree, you can find all TBC-related documentation underneath;
quite cleanly separated from the rest. We have also started to convert
the help pages to a single PDF document, but this work isn't finished
yet (requires some scripting). We hope to deliver this one day soon.

Holger

PS: Thanks a lot for your friendly comments in the other mail thread,
Mike - much appreciated here.

Scott Henninger

unread,
Jun 6, 2012, 12:55:09 PM6/6/12
to TopBraid Suite Users
Michele; You will need either the Standard or Maestro edition of
Composer to do batch operations to refastor namespaces.

-- Scott

On Jun 6, 4:04 am, Michele Pasin <michele.pa...@gmail.com> wrote:
> Hi,
>
> I tried using the 'batch operation' to modify namespaces, but the only two
> options I get are "Add partial imports via RDFex" and "Link with DBPedia
> resources".
>
> Is it because I'm on the TBC free edition?
>
> Many thanks,
> Michele
Reply all
Reply to author
Forward
0 new messages