uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: Defining SuperType or Range for Custom Type
Date Wed, 15 Aug 2012 19:31:58 GMT
This should work if the range type, org.bson.types.ObjectId is defined as a uima
type (meaning, that it has as the root of its supertype hierarchy the built-in
uima type uima.cas.TOP).

I noticed, also, that the main type you are defining, uima.cpe.DocumentMetadata,
is named in a bit of a strange way, because the package name prefix part of
this, "uima.cpe." could lead a casual reader to think that this type was some
kind of a built-in type within UIMA itself, and I don't think that it is :-)

So, for instance, if you were developing an application for a company "foo", it
might be better (to avoid potential name collisions in the future) to name this
type: foo.DocumentMetadata, or something like that.

-Marshall
On 8/15/2012 2:40 PM, Andreas Niekler wrote:
> Hello,
>
> i had a review on the documentation and i still wonder if such things can be
> done:
> <typeDescription>
>       <name>uima.cpe.DocumentMetadata</name>
>       <description>This is a Type to add all Metadata to a document that is
> defined</description>
>       <supertypeName>uima.tcas.DocumentAnnotation</supertypeName>
>       <features>
>         <featureDescription>
>           <name>DB_ID</name>
>           <description>THE DATABASE ID</description>
> <!--IMPORTANT HERE -->
> <!--IMPORTANT HERE -->
>           <rangeTypeName>org.bson.types.ObjectId</rangeTypeName>
> <!--IMPORTANT HERE -->
> <!--IMPORTANT HERE -->
>         </featureDescription>
>       </features>
>     </typeDescription>
>
> Thanks for clarification
>
> Andreas
>
> Am 15.08.2012 15:38, schrieb Marshall Schor:
>>
>> On 8/15/2012 9:17 AM, Andreas Niekler wrote:
>>> Hello,
>>>
>>> right now i'm wondering if it is possible to define a type in the type editor,
>>> which is not of a primitive from uima. Instead i want to give it a Class which
>>> represents a Database Id.
>>>
>>> Is it possible to assign other SuperTypes than those in uima.tcas namespace?
>>
>> The uima types can have arbitrary supertypes, but the supertype chain eventually
>> has to inherit from uima.cas.TOP.  See
>> http://uima.apache.org/d/uimaj-2.4.0/references.html#ugr.ref.cas.builtin_types
>>
>> -Marshall
>>
>


Mime
View raw message