Found no base URI for topic map

Forum is for miscellaneous user help requests.

Found no base URI for topic map

Postby athanassios » Tue Aug 07, 2012 9:52 am

Good morning,
I do an import of an LTM file, and I have define a Wandora class topic to see my top level classes on the tree of the default layer or any other layer I define.
[WNDR = "Wandora class" @"http://www.wandora.org/core/wandoraclass" ]

When the file is loaded, I always get the following message

"Found no base URI for topic map. Using default base 'http://www.wandora.org/ltm-import"

The effect of this is that Wandora adds its own subject identifier to all my topics e.g.
http://www.wandora.org/ltm-import/Person

Is there a way to avoid this kind of default identifier, can you also explain what is the use of it ?

Thank you
athanassios
 
Posts: 47
Joined: Wed Sep 07, 2011 12:16 pm
Location: Greece

Re: Found no base URI for topic map

Postby akivela » Tue Aug 07, 2012 5:30 pm

Good evening :)

Wandora outputs a message

Found no base URI for topic map. Using default base 'http://www.wandora.org/ltm-import

when the LTM file doesn't contain BASEURI directive [1]. Directive defines an URI prefix for topics which don't explicitly have absolute URIs as subject identifiers. Thus, it has nothing to do with Wandora class topic found in Wandora's base ontology. There are two ways to stop Wandora adding the default URI prefix to subject identifiers. First, you can add a BASEURI directive to the top of your LTM file and specify your own URI prefix. Second, you can add an explicit subject identifier to all topics introduced in the LTM file. If you have already imported the topic map and can't revert, you can always use tool Topics > Subject identifiers > Regex replace SIs... in context of topic map layer and change the default URI path to anything you wish.

Kind Regards,
Aki / Wandora Team

[1] See chapter 2.7.4. The BASEURI directive at http://www.ontopia.net/download/ltm.html
akivela
Site Admin
 
Posts: 256
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland

Re: Found no base URI for topic map

Postby athanassios » Tue Aug 07, 2012 10:50 pm

O.K let me go through a specific example to help me understand it better
Suppose the following is my ltm file
----------------------------------------------------------------------------------------------------
@"utf-8"
#VERSION "1.3"
#BASEURI "http://neurorganon.org/"

[WNDR = "Wandora class" @"http://www.wandora.org/core/wandoraclass"]

[NULO:WNDR = "Neurorganon Upper Level Ontology" @"http://neurorganon.org/nulo.html"]

[createdBy:WNDR ="created By" @"http://neurorganon.org/createdBy"]

[narrower:WNDR = "Narrower" @"http://www.w3.org/2004/02/skos/core#narrower"
@"http://www.topicmaps.org/xtm/1.0/core.xtm#subclass"]
----------------------------------------------------------------------------------------------------------
After importing LTM I get extra subject identifiers for all my topics except createdBy
http://neurorganon.org/narrower
http://neurorganon.org/WNDR
http://neurorganon.org/NULO

But http://www.ontopia.net/download/ltm.html#N565 says
This directive is used to change the base URI against which relative URIs in the document are resolved

Questions are :
1) Why Wandora ADDS baseuri subject identifiers ?
I noticed also some inconsistent behaviour, it has not added SI for createdBy???

2) http://neurorganon.org/nulo.html and http://neurorganon.org/createdBy are absolute URIs
how one can replace them with relative URIs using the BASEURI so that they are resolved according to the definition.

For the PREFIX directive http://www.ontopia.net/download/ltm.html#N619
it says that is used to refer to the topic directly using its subject indicator, but this not what I want in this case as I am giving new ids e.g. narrower.
athanassios
 
Posts: 47
Joined: Wed Sep 07, 2011 12:16 pm
Location: Greece

Re: Found no base URI for topic map

Postby akivela » Fri Aug 10, 2012 12:39 pm

Hello

Yes, you are right. Wandora indeed makes a subject identifier from a topic id automatically -- even if topic has explicit subject identifier. Automatically created subject identifier is constructed by adding a value of BASEURI directive in front of the topic id. A topic with an id NULO gets then a subject identifier http://neurorganon.org/NULO if the value of BASEURI is http://neurorganon.org/. Similarly, a topic with an id createdBy gets subject identifier http://neurorganon.org/createdBy. As the explicit subject identifier given to the topic is same, two identical subject identifiers collapse into a single subject identifier. This may give an impression that the behavior is inconsistent.

The feature of transforming ids to subject identifiers is a bug in Wandora's LTM importer. LTM importer is not using ID_MAPPING at the moment although it should. As a consequence, ids are transformed to subject identifiers. I'll fix this issue in next Wandora release. If you can't wait and need the fix immediately, you can change the line 67 in Wandora source file org.wandora.topicmap.parser.LTMParser.java from

Code: Select all
public static boolean USE_ID_MAPPING = false;


to

Code: Select all
public static boolean USE_ID_MAPPING = true;


and compile the java source.

About your second question. Define BASEURI directive and then use relative subject identifiers. Wandora notices, the subject identifier is relative and completes it with the base uri. Your LTM file would then look something like

Code: Select all
"utf-8"
#VERSION "1.3"
#BASEURI "http://neurorganon.org/"
[WNDR = "Wandora class" @"http://www.wandora.org/core/wandoraclass"]
[NULO:WNDR = "Neurorganon Upper Level Ontology" @"nulo.html"]
[createdBy:WNDR ="created By" @"createdBy"]
[narrower:WNDR = "Narrower" @"http://www.w3.org/2004/02/skos/core#narrower" @"http://www.topicmaps.org/xtm/1.0/core.xtm#subclass"]


Did I manage to answer all your questions?

Kind Regards,
Aki / Wandora Team
akivela
Site Admin
 
Posts: 256
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland

Re: Found no base URI for topic map

Postby akivela » Mon Aug 13, 2012 11:42 am

Hello Athanassios

Just to let you know, we are planning to release next Wandora version 31st of August (2012).

Kind Regards,
Aki / Wandora Team
akivela
Site Admin
 
Posts: 256
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland


Return to How to... and problems

Who is online

Users browsing this forum: No registered users and 1 guest