You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Philip Ogren <ph...@ogren.info> on 2007/06/07 21:23:12 UTC

problem creating "Index Collection Descriptor File"

I have three related questions that I decided to split up into three 
messages.  I composed them as one email initially and decided I could be 
spawning a hard-to-traverse thread.  Advanced apologies for the inundation.

I am trying to create an "Index Collection Descriptor File" so that I 
can have my index definitions in one place and unable to do so.  I 
dialog comes up requesting a type system descriptor file as a context 
for the descriptor file.  When I specify my type system descriptor file 
and click ok/finish the component descriptor editor gives me an error 
message and a details button.  When I click on the the details button I 
get:

java.lang.ClassCastException: java.io.File
	at org.apache.uima.taeconfigurator.editors.MultiPageEditor.loadContext(MultiPageEditor.java:1479)
	at org.apache.uima.taeconfigurator.editors.MultiPageEditor.setFsIndexCollection(MultiPageEditor.java:1505)
...
	at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
	at org.eclipse.core.launcher.Main.run(Main.java:977)
	at org.eclipse.core.launcher.Main.main(Main.java:952)


Am I doing something wrong or is this functionality broken?

Thanks,
Philip

Re: problem creating "Index Collection Descriptor File"

Posted by Marshall Schor <ms...@schor.com>.
Philip Ogren wrote:
> Great!
> Is there a complete example of an index collection descriptor file I 
> could look at somewhere?
See section 2.4.1.7 in the reference doc: 
http://incubator.apache.org/uima/downloads/releaseDocs/2.1.0-incubating/docs/html/references/references.html

One easy way to generate an "importable" file of just the indexes, is to 
do this:

1) Use the Component Descriptor Editor to edit a regular Analysis Engine 
descriptor
2) Add some index definitions to this descriptor - ones that you want to 
have in the separate importable file.
3) Use the "export" button to export all the index definitions to a new, 
importable file.

Then you can look at that file to see a nice example of what it should 
look like.

I did this with some old test files, and it produced this (the indexes 
are just testing samples):

<?xml version="1.0" encoding="UTF-8"?>
<fsIndexCollection xmlns="http://uima.apache.org/resourceSpecifier">
  <name>sampleIndexDef</name>
  <description/>
  <version>1.0</version>
  <vendor/>
  <imports>
    <import location="indeximport1.xml"/>
  </imports>
  <fsIndexes>
    <fsIndexDescription>
      <label>newIndexLabel</label>
      <typeName>some.IndexTest</typeName>
      <kind>sorted</kind>
      <keys>
        <fsIndexKey>
          <featureName>IndexFeature</featureName>
          <comparator>standard</comparator>
        </fsIndexKey>
      </keys>
    </fsIndexDescription>
    <fsIndexDescription>
      <label>newType33Index</label>
      <typeName>some.newType33</typeName>
      <kind>sorted</kind>
      <keys>
        <fsIndexKey>
          <featureName>feature5</featureName>
          <comparator>standard</comparator>
        </fsIndexKey>
        <fsIndexKey>
          <featureName>end</featureName>
          <comparator>standard</comparator>
        </fsIndexKey>
      </keys>
    </fsIndexDescription>
    <fsIndexDescription>
      <label>some.set.index</label>
      <typeName>some.newType33</typeName>
      <kind>set</kind>
      <keys>
        <fsIndexKey>
          <featureName>sofa</featureName>
          <comparator>standard</comparator>
        </fsIndexKey>
        <fsIndexKey>
          <featureName>feature5</featureName>
          <comparator>standard</comparator>
        </fsIndexKey>
      </keys>
    </fsIndexDescription>
  </fsIndexes>
</fsIndexCollection>

-Marshall

Re: problem creating "Index Collection Descriptor File"

Posted by Philip Ogren <ph...@ogren.info>.
Great! 

Is there a complete example of an index collection descriptor file I 
could look at somewhere? 

> It's broken.  See Jira issue: 
> http://issues.apache.org/jira/browse/UIMA-426
> It's been fixed and the fix will be in the next release.
>
> -Marshall
>
>

Re: problem creating "Index Collection Descriptor File"

Posted by Marshall Schor <ms...@schor.com>.
Philip Ogren wrote:
> I have three related questions that I decided to split up into three 
> messages.  I composed them as one email initially and decided I could 
> be spawning a hard-to-traverse thread.  Advanced apologies for the 
> inundation.
>
> I am trying to create an "Index Collection Descriptor File" so that I 
> can have my index definitions in one place and unable to do so.  I 
> dialog comes up requesting a type system descriptor file as a context 
> for the descriptor file.  When I specify my type system descriptor 
> file and click ok/finish the component descriptor editor gives me an 
> error message and a details button.  When I click on the the details 
> button I get:
>
> java.lang.ClassCastException: java.io.File
>     at 
> org.apache.uima.taeconfigurator.editors.MultiPageEditor.loadContext(MultiPageEditor.java:1479) 
>
>     at 
> org.apache.uima.taeconfigurator.editors.MultiPageEditor.setFsIndexCollection(MultiPageEditor.java:1505) 
>
> ...
>     at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
>     at org.eclipse.core.launcher.Main.run(Main.java:977)
>     at org.eclipse.core.launcher.Main.main(Main.java:952)
>
>
> Am I doing something wrong or is this functionality broken?
It's broken.  See Jira issue: http://issues.apache.org/jira/browse/UIMA-426
It's been fixed and the fix will be in the next release.

-Marshall