Thanks Jörn and Richard! My question about if the addresses and the ids in xmi are the same was really just to help me understand how they operate. And Jörn's answered helped me. That makes sense that ids are reassigned when a cas is created or deserialized.
So a little background…I'm wrapping a java component in a UIMA analysis engine, and I need to pass in information about existing annotations so that the annotations it creates can include references to previously existing annotations. So that's why I'm passing in the address of the existing annotations (I don't want my wrapped component to have any knowledge of the uima types, so I'm passing this in as an "external identifier" field). When I get the results from my wrapped component (when control comes back to my analysis engine), I can then construct the new output annotations. And I can then lookup the address of the original annotation that each new annotation refers to, and set a reference. There is a method JCas.getJfsFromCaddr(). It's marked as "internal use" in the javadocs, and there's no additional detail. But it sounds like that might be exactly what I'm looking for. Otherwise, I can just iterate over all the annotations and create a HashMap keyed off the address. Maybe that's the way to go, as it doesn't depend on internal apis. I'm open to other ways to do this too. Matt From: Jörn Kottmann <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Tue, 11 Oct 2011 23:56:29 +0200 To: <[email protected]<mailto:[email protected]>> Subject: Re: jcas, annotation, address, and id annotation
