From uima-user-return-979-apmail-incubator-uima-user-archive=incubator.apache.org@incubator.apache.org Wed Jan 23 13:57:30 2008 Return-Path: Delivered-To: apmail-incubator-uima-user-archive@locus.apache.org Received: (qmail 46954 invoked from network); 23 Jan 2008 13:57:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 23 Jan 2008 13:57:30 -0000 Received: (qmail 74225 invoked by uid 500); 23 Jan 2008 13:57:20 -0000 Delivered-To: apmail-incubator-uima-user-archive@incubator.apache.org Received: (qmail 74166 invoked by uid 500); 23 Jan 2008 13:57:19 -0000 Mailing-List: contact uima-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: uima-user@incubator.apache.org Delivered-To: mailing list uima-user@incubator.apache.org Received: (qmail 74135 invoked by uid 99); 23 Jan 2008 13:57:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2008 05:57:19 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_HELO_PASS,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.227.126.171] (HELO moutng.kundenserver.de) (212.227.126.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Jan 2008 13:57:06 +0000 Received: from [9.152.14.86] (blueice3n1.de.ibm.com [195.212.29.179]) by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis) id 0MKxQS-1JHg663m3a-0004ud; Wed, 23 Jan 2008 14:56:59 +0100 Message-ID: <479747AB.9060903@michael-baessler.de> Date: Wed, 23 Jan 2008 14:56:59 +0100 From: Michael Baessler Reply-To: mba@michael-baessler.de User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: uima-user@incubator.apache.org Subject: Re: Programmatically check for correctness of Aggregate-TAE References: <4794D03A.3010400@neofonie.de> In-Reply-To: <4794D03A.3010400@neofonie.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V01U2FsdGVkX1+4sSVu2naNdzR4V3o5UTqaTUvdBgGR1wYaoLh 7TYJkOlcnS0H6gYwHXXBPdv7vW1Ugn+34GyMHjKTaTEO07HKJY QCcKOTg201g+StyzIzTTw== X-Virus-Checked: Checked by ClamAV on apache.org What about checking the aggregate descriptor settings before you initialize it... like: File aggDesc = new File("aggregateDescriptor.xml"); XMLInputSource in = new XMLInputSource(aggDesc); AnalysisEngineDescription aeDesc = UIMAFramework.getXMLParser().parseAnalysisEngineDescription(in); ConfigurationParameterSettings paramSettings = aeDesc.getAnalysisEngineMetaData().getConfigurationParameterSettings(); So you can check if the necessary settings are available if not you can throw an exception. If all is fine you can instantiate the ae. Does this help? -- Michael Christoph Büscher wrote: > Hi List, > > I would like to be able to check the parameter settings of one of my > custom aggregate TAEs on initialization. > The general idea is that the component engines of the aggregate are > configured in the aggregates XML descriptor via "overrides". However > there are a few constraints on the parameter settings that I would > like to check when the aggregate is initialized. > So far I don't know if and how it is possible to provide an own Java > implementation for the aggregate TAE. If this is possible, the > appropriate place would be the aggregates initialize() method, since > the configuration is accessible there. Can anyone tell me if it is > possible to have an implementation for an aggregate or not and if so, > how? If this isn't possible, where would be another good place to do a > sanity check on the aggregates parameter settings? > > Many thanks in advance, > > Christoph