Re: changing annotation types under Amaya

Hello Tim,

On Mon, May 14, 2001 at 03:46:17AM -0400, Tim Moore wrote:
> Help!  The Amaya Documentation says something like "We'll explain later
> how users can create their own types."  I can't find this explanation,
> or work out what to do.

You're right. We haven't yet updated this part of the doc, but the work
to do is quite easy.

First some info...

The annotation and annotation types RDF schemata are currently stored in the
Amaya/config directory under the names annotschema.rdf and annottypes.rdf.

As we can't yet dynamically download schemas from the web, we have another
file called annot.schemas that tells Amaya the filenames where we stored
the annotation schemas.  This file is also under Amaya/config/

Now, if you want to add new annotation types, you'll need to define their
namespace and write their schema. This is quite easy.

Let's do a new namespace called MyTypes.

I add the following line to the end of annot.schemas:

http://www.w3.org/2001/05/MyTypes# $THOTDIR/config/mytypes.rdf

Then I'll add a new annotation type called "kudos" in mytypes.rdf:

--------------
rdf:RDF
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#">

<rdf:Description about="http://www.w3.org/2000/10/MyTypes#">
 <rdfs:comment>A namespace for describing types of annotations</rdfs:comment>
 <rdfs:comment>$Revision: 1.2 $ $Date: 2000/11/03 21:40:17 $</rdfs:comment>
 <rdfs:seeAlso resource="http://www.w3.org/2000/02/Collaboration/Annotation/papers"/>
</rdf:Description>

<rdfs:Class rdf:about="http://www.w3.org/2000/10/MyTypes#Kudos">
  <rdfs:label xml:lang="en">Kudos</rdfs:label>
  <rdfs:comment>A class of Annotations representing positive congratulations</rdfs:comment>
  <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/10/annotation-ns#Annotation"/>
  <rdfs:isDefinedBy resource="http://www.w3.org/2000/10/MyTypes#"/>
</rdfs:Class>

</rdf:RDF>
------------

And that's all. Next time I launch Amaya, I'll see the new Kudos annotation
type. Look at the annottypes.rdf file to see other examples.

As you can see, Amaya is not yet able to download schemata dynamically from
the Web. For Amaya to understand the semantics of Kudos (the label in this
case), the schema has to be stored in the Amaya/config directory. If this
were not the case, then Amaya would have shown the URL of the property when
browsing annotations of this type. It wouldn't have been possible to
create such a type with Amaya either. These are things we need to further
develop.

Tell us if you have any problems or other questions.

-jose

Received on Monday, 14 May 2001 06:24:46 UTC