[seek-dev] Re: registry in Ecogrid

Matt Jones jones at nceas.ucsb.edu
Fri Mar 26 12:12:27 PST 2004


Bing,

To insert an XML document in metacat, you just need to do an HTTP 
request with appropriate parameters set.  We have a very simple web form 
for inserting XML documents in this way -- these are not intended for 
end users, but rather for developers to do testing.  But they should 
work for you.  They are described below. In addition, we have several 
client libraries (Java, Perl, partial Python) that allow you to do this 
programatically with just a couple of function calls (login, insert, 
update, delete).  This is what we need to eventually codify in the 
ecogrid write API.  If you'd rather use the programatic API, let me know 
and I'll forward an email I wrote about this to you.  In the meantime, 
the details on using the web form are below.

Matt

To use the web forms, first go to this page:
   http://knb.ecoinformatics.org/knb/style/skins/dev/login.html
and provide an LDAP DN in the KNB system and a password.  Your DN in the 
system is:
   uid=zhu,o=SDSC,dc=ecoinformatics,dc=org
You can reset your password at knb.ecoinformatics.org if you don't 
already know it.

After you've logged in, go to this page:
   http://knb.ecoinformatics.org/knb/style/skins/dev/loadxml.html
which is a form for inserting, updating and deleting XML documents.  You 
need to provide a document identifier of this form:
   scope.id.rev
where "scope" is an arbitrary string, id is an integer uniquely 
identifiying this document within the scope, and rev is an integer 
starting at 1 that indicates the revision number of the document.  For 
example, you might pick "seek.2.1" for a seek ontology you're going to 
insert.

Copy and paste the xml into the text box, and hit the button.  When 
inserting, I noticed that the SEEK RDF files contain some text below the 
root element (at the end of the doc): this causes an error when reading 
the doc, and I need to figure out if it is a bug in metacat or a 
not-well-formed XML document.  In any case, the workaround is to remove 
any comments or whitespace follwoing the final closing tag of the root 
element before inserting the document.

If you want to update, you can do so by increasing the revision number 
(e.g., to seek.2.2), chnaging the radio button to "Update", and pasting 
in the new document, then hit the button.  Delete should be self 
explanatory.

At this point, only the user "zhu" can read the document.  To change 
access control, visit the following url:
http://knb.ecoinformatics.org/knb/metacat?action=setaccess&docid=seek.2.1&qformat=xml&principal=public&permission=read&permType=allow&permOrder=allowFirst
Obviously, you need to change the docid in the url to the one you want, 
and you have to be logged in as the document owner for this to work. 
After this setaccess command is successful, the public should be able to 
read the document.

As a test, I inserted the current "EcologicalConcepts.owl" document from 
the CVS repository into metacat as "seek.1.2".  You can retireve it from 
metacat at this URL:
http://metacat.nceas.ucsb.edu/knb/servlet/metacat?action=read&qformat=xml&docid=seek.1.2

It should also be retrievable using the ecogrid "Get" API from the 
Ecogrid client.

Bing Zhu wrote:
> Matt,
> 
> Sounds good to me.
> 
> I originally also thought that either Metacat or SRB should be a good choice
> for
> storing ontologies since we already built query function for Metacat and SRB
> (Digir too)
> in Ecogrid.
> 
> Let us work on the Metacat approach first. Please send me some documents
> or examples to create datasets in Metacat.
> (If you have several Metacat instances, please let me which one is to be
> used for
> our SEEK project.)
> 
> Thanks.
> 
> Bing
> 
> 
> 
> -----Original Message-----
> From: Matt Jones [mailto:jones at nceas.ucsb.edu]
> Sent: Thursday, March 25, 2004 9:21 AM
> To: Rod Spears
> Cc: bzhu at sdsc.edu; Jing Tao; Seek-Dev
> Subject: Re: registry in Ecogrid
> 
> 
> Bing,
> 
> As the OWL documents are XML docs, I think an easy way to put them into
> the EcoGrid is to insert them into a metacat server (it supports any XML
> content).  That way they will be searchable and available from the API
> Jing is putting into Kepler (the ecogrid client).  Sound good?  If so,
> let me know and we can show you how to load them.
> 
> The registry that Rod is building sounds like a less appropriate place
> for storing them.
> 
> Matt
> 
> Rod Spears wrote:
> 
>>Although I am on vacation I thought I would answer this quickly. The
>>registry directory is for the registry work I have done. Not everything
>>is checked in yet (like the Java Server Pages), it should build and not
>>effect any of the other builds.
>>
>>Rod
>>
>>
>>Bing Zhu wrote:
>>
>>
>>>Matt, Jing, Rod and other Ecogrid researchers,
>>>
>>>I noticed that there is a new directory, registry, under Ecogrid. What's
> 
> the
> 
>>>current status
>>>of this one?
>>>
>>>Shawn and I have been talking about storing ontologies in Ecogrid. A
>>>registry is
>>>an ideal place for this.  (I think the registry has its own built-in query
>>>capability.)
>>>
>>>Bing
>>>SDSC
>>>
>>>
>>>
>>
>>--
>>	Rod Spears
>>Biodiversity Research Center
>>University of Kansas
>>1345 Jayhawk Boulevard
>>Lawrence, KS 66045, USA
>>Tel: 785 864-4082, Fax: 785 864-5335
>>
> 
> 
> --
> -------------------------------------------------------------------
> Matt Jones                                     jones at nceas.ucsb.edu
> http://www.nceas.ucsb.edu/    Fax: 425-920-2439    Ph: 907-789-0496
> National Center for Ecological Analysis and Synthesis (NCEAS)
> University of California Santa Barbara
> Interested in ecological informatics? http://www.ecoinformatics.org
> -------------------------------------------------------------------

-- 
-------------------------------------------------------------------
Matt Jones                                     jones at nceas.ucsb.edu
http://www.nceas.ucsb.edu/    Fax: 425-920-2439    Ph: 907-789-0496
National Center for Ecological Analysis and Synthesis (NCEAS)
University of California Santa Barbara
Interested in ecological informatics? http://www.ecoinformatics.org
-------------------------------------------------------------------



More information about the Seek-dev mailing list