> Some things are not clear:
>   * Is the database empty at the start of the load?
yes,

>   * which version of TDB are you using?
I test with TDB 0.8.10, 0.80.11 and 0.9
>   * what OS are you running?
Redhat Linux 6.0

>   * is this 32 or 64 bit java?
32bit

I load the data by using the cmdline, tdbloader --loc=/home/tdb/ontology 
/home/timezone.owl

you can test with the timezone.owl, and with the code below the value of ns is 
null.

public SearchOntology2() {

String directory = "/home/Workspaces/zljDB";
// String directory = "/home/Workspaces/zljDB";
Dataset ds = TDBFactory.createDataset(directory);

model = ds.getDefaultModel();

OntModel ontmodel = ModelFactory.createOntologyModel(
OntModelSpec.OWL_DL_MEM_TRANS_INF, model);

String ns = ontmodel.getNsPrefixURI("");
}



--------------------------------------------------
From: "Andy Seaborne" <[email protected]>
Sent: Thursday, December 08, 2011 4:32 PM
To: <[email protected]>
Subject: Re: prefixes problem about tdb

> On 08/12/11 02:19, xh-zh wrote:
>> First, when I load a model from TDB, I will need to get the baseURI
>> of the model with OntModel.getNsPrefixURI(""), but I always get null.
>> I can only get four prefixes of the model with
>> OntModel.getNsPrefixMapping(), which are rdfs, rdf, owl and xsd.
>>
>> second, I read the source code of TDB, when it create the dataset or
>> graph, it does create the prefixes of the graph according to reading
>> the prefixes.dat, but the prefixes.dat is empty.
>>
>> finally, according to the source code of TDB, I did not find the code
>> about processing and storing the prefixes in my input file, such as
>> owl file and N3 file.  If TDB does processing the prefixes in the
>> input file while loading data, can you tell me which classes are
>> related?
> 
> I'm guessing its not storing them.  To investigate, I need a complete, 
> minimal example and until yesterday it has not been clear how you're 
> loading the base data.  The fact it's tdbloader is an important point; 
> Fuseki does not use it.
> 
> Some things are not clear:
>   * Is the database empty at the start of the load?
>   * which version of TDB are you using?
>   * what OS are you running?
>   * is this 32 or 64 bit java?
> 
> Andy
> 

Reply via email to