[Kim-discussion] insert new instances into KIM
Philip Alexiev
philip.alexiev at sirma.bg
Tue Jun 22 11:03:30 EDT 2010
Hello Yang,
You will find the answers inline the document.
On 06/22/2010 04:27 PM, Yang Fangkai wrote:
> Hello, Philip,
>
> Please find the attached file. In this file, there are
> three "drill_fluid_additive" instances whose names begin with "SAFE".
> All classes and properties have been defined in protont,owl properly
> (and with a rdfs:label attribute for each class, in particular,
> drill_fluid_additive is defined as a subclass of protont#material
> which is a subclass of protont#object), and declared visible. After
> importing this file by toolRDFImport.cmd, I have the following
> problem:
>
> 1. query: query instances for all "drill_fluid_additive",
> all instances are retrieved; query instances for all
> "drill_fluid_additive" starting with "SAFE", no result is returned.
> The same problem occurs when I use these triples (either in RDF or in
> N-Triple format) as a separate knowledge base that loaded by Sesame,
> instead of importing triples by toolRDFImport.
>
Basically, KIM operates in two modes - using labels, or aliases. This is
configured in $KIM_HOME/config/install.properties in
com.ontotext.kim.KIMConstants.ENTITY_DESCR property.
- Labels - more simple and more compact. Generally what is required is
that each entity has at least a protons:mainLabel, and different
optional rdfs:label descriptions.
- Aliases - uses aliases, which are objects by themselves, to describe
the entities. The idea is to be able to have meta information for the
labels. This is the default model KIM uses.
In your case you provided a label, but your model is most probably
"Aliases". And, of course, you should also provide a mainAlias/mainLabel .
> 2. In Protege, I define a restriction "producedBy" for
> drill_fluid_additive, linking the entity to its manufacturers, but in
> WebGUI, after selecting X as an entity of "drill_fluid_additive", I
> cannot select property "producedBy" in the drag-down box below it. But
> for other three properties (e.g., primaryFunction, etc.) I can. I am
> wondering why.
>
Try setting "drill_fluid_additive" as a domain of the property
"producedBy" .
> 3. The manufacturer locates in Houston, TX. How can I relate
> the "Houston" in this newly imported RDF to the city "Houston" defined
> in KIM wkb.nt? Because I want to take advantage of the underlying
> geographic information in KIM.
>
Use the URI of Houston from the wkb.nt :
<Manufacturer> <http://proton.semanticweb.org/2006/05/protont#locatedIn>
<http://www.ontotext.com/kim/2006/05/wkb#City_T.2949> .
> Thank you so much for your help!
>
> Fangkai
>
Hope this helps,
Philip
More information about the Kim-discussion
mailing list