Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Incremental Instance Loading

O'Neill, Dennis doneill at marathonoil.com
Wed Mar 26 05:59:44 PDT 2008


This seems backwards. There is already machinery in Protégé to load up an instance file. All this is needed is to split out the functionality in loadKnowledgeBase so that it does not create a new one and load an ontology file, but just load an instances file into an already open KB.

Dennis M. O'Neill
SAIC
Room 2069B
doneill at marathonoil.com
(281) 236-5690
-----Original Message-----
From: protege-discussion-bounces at mailman.stanford.edu [mailto:protege-discussion-bounces at mailman.stanford.edu] On Behalf Of Thomas Russ
Sent: Tuesday, March 25, 2008 5:27 PM
To: User support for Core Protege and the Protege-Frames editor
Subject: Re: [protege-discussion] Incremental Instance Loading


On Mar 25, 2008, at 5:54 AM, O'Neill, Dennis wrote:
> I agree on the usefulness of the DB backend for on-going management.
>
> I've taken a quick look at the Protégé source. Is there an  
> architecture/design document that describes the overall structure?  
> It seems that using the existing code that loads the .pins file  
> would be a good place to start, but it is not obvious where this is  
> done.

I personally wouldn't bother with pins format, but instead just pick  
something that I found easy to parse, either plain text or XML.  Then  
I would just go through that file and create the instances and assign  
property values, using the standard API functions to do the instance  
creation and property assignments.  See <http://protege.stanford.edu/doc/pdk/kb-api.html 
 >.  For example:

    Cls c = KnowledgeBase.getCls("className");
    Instance i = KnowledgeBase.createInstance("instanceName", c);
    Slot s = KnowledgeBase.getSlot("slotName");
    Object value = ...;
    i.addOwnSlotValues(s, value);   // from Frame.

etc.

>
>
> Thanks,
>
> Dennis M. O'Neill
> SAIC
> Room 2069B
> doneill at marathonoil.com
> (281) 236-5690
> -----Original Message-----
> From: protege-discussion-bounces at mailman.stanford.edu [mailto:protege-discussion-bounces at mailman.stanford.edu 
> ] On Behalf Of Thomas Russ
> Sent: Monday, March 24, 2008 8:09 PM
> To: User support for Core Protege and the Protege-Frames editor
> Subject: Re: [protege-discussion] Incremental Instance Loading
>
>
> On Mar 24, 2008, at 2:01 PM, O'Neill, Dennis wrote:
>> Samson,
>>
>> It is not a case of needing to load instances on demand, but rather
>> to programmatically create them on demand from an external source.
>>
>> For example, new oil wells are drilled in an oil field on a regular
>> basis. My Protégé system has complete information as of a certain
>> date (e.g., March 31, 2008). On April 30, I want to upload (new)
>> information about the wells that have been drilled in the month of
>> April. How can I load them into my existing knowledge base without
>> keying them in manually?
>>
>> A "Load Instances" command (from a validly structured .pins file)
>> would serve the purpose quite nicely.
>
> Well, you could always build a plugin to do what you want.  Perhaps a
> tab plugin or just a plugin that adds a menu item.  You could then
> have your own custom Java code that reads a file of your choice and
> uses the Protege API to insert the new instances.  You would thus get
> complete control.
>
> Although the database for storing the instances sounds like it might
> be a good idea as well, since then you could do the incremental
> updates and let the DB backend worry about the persistence.
>
>
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at lists.stanford.edu
> https://mailman.stanford.edu/mailman/listinfo/protege-discussion
>
> Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03

_______________________________________________
protege-discussion mailing list
protege-discussion at lists.stanford.edu
https://mailman.stanford.edu/mailman/listinfo/protege-discussion

Instructions for unsubscribing: http://protege.stanford.edu/doc/faq.html#01a.03 



More information about the protege-discussion mailing list