protected void readPropertyValueFromXMLElement(PropertyXmlInfo aPropXmlInfo, Element aElement, XMLParser aParser, ParsingOptions aOptions) throws InvalidXMLException { // Catch the case where both fsIndexes and fsIndexCollection are specified if ("fsIndexes".equals(aPropXmlInfo.xmlElementName) || "fsIndexCollection".equals(aPropXmlInfo.xmlElementName)) { if (mFsIndexCollection != null) { throw new InvalidXMLException(InvalidXMLException.FS_INDEXES_OUTSIDE_FS_INDEX_COLLECTION, null); } } super.readPropertyValueFromXMLElement(aPropXmlInfo, aElement, aParser, aOptions); }
protected void readUnknownPropertyValueFromXMLElement(Element aElement, XMLParser aParser, ParsingOptions aOptions, List<String> aKnownPropertyNames) throws InvalidXMLException { // Catch the case where both fsIndexes and fsIndexCollection are specified if ("fsIndexes".equals(aElement.getTagName()) || "fsIndexCollection".equals(aElement.getTagName())) { if (mFsIndexCollection != null) { throw new InvalidXMLException(InvalidXMLException.FS_INDEXES_OUTSIDE_FS_INDEX_COLLECTION, null); } } super.readUnknownPropertyValueFromXMLElement(aElement, aParser, aOptions, aKnownPropertyNames); }
@Override protected void writePropertyAsElement(PropertyXmlInfo aPropInfo, String aNamespace) throws SAXException { // Prevent the fsIndexes property from being written to XML - it exists only so old-style XML // can be read. if (!"fsIndexes".equals(aPropInfo.propertyName)) { super.writePropertyAsElement(aPropInfo, aNamespace); } }
ResourceMetaData_impl meta = new ResourceMetaData_impl();
ConfigurationParameterDeclarations cfgParamDecls = getConfigurationParameterDeclarations(); ConfigurationParameterSettings cfgParamSettings = getConfigurationParameterSettings(); NameValuePair[] nvps = cfgParamSettings.getParameterSettings(); if (nvps.length > 0) { validateConfigurationParameterSettings(nvps, null, cfgParamDecls); support240bug = true; // System.getenv("UIMA_Jira3123") != null; // restore this post 2.4.1 NameValuePair[] gnvps = entry.getValue(); if (gnvps != null) { validateConfigurationParameterSettings(gnvps, groupName, cfgParamDecls);
throw new ResourceConfigurationException( ResourceConfigurationException.NONEXISTENT_PARAMETER, new Object[] { name, getName() }); } else { throw new ResourceConfigurationException( ResourceConfigurationException.NONEXISTENT_PARAMETER_IN_GROUP, new Object[] { name, aGroupName, getName() }); validateConfigurationParameterDataTypeMatch(param, aNVPs[i]);
new Object[] { paramName, getName() }); aNVP.setValue(Array.newInstance(getClassForParameterType(paramType), 0)); return; if (valClass != getClassForParameterType(paramType)) { throw new ResourceConfigurationException( ResourceConfigurationException.PARAMETER_TYPE_MISMATCH, new Object[] { getName(), valClass.getName(), paramName, paramType });
/** * Overridden to validate configuration parameter data types immediately after parsing is * complete. * * @see org.apache.uima.util.XMLizable#buildFromXMLElement(org.w3c.dom.Element, * org.apache.uima.util.XMLParser) */ public void buildFromXMLElement(Element aElement, XMLParser aParser, XMLParser.ParsingOptions aOptions) throws InvalidXMLException { super.buildFromXMLElement(aElement, aParser, aOptions); try { validateConfigurationParameterSettings(); } catch (ResourceConfigurationException e) { throw new InvalidXMLException(e); } }
if (ConfigurableDataResource_impl.class.isAssignableFrom(aInterface)) { ConfigurationData cfg = ConfigurationParameterFactory.createConfigurationData(aParams); ResourceMetaData_impl meta = new ResourceMetaData_impl();
dummyAsbSpecifier.setMetaData(new ResourceMetaData_impl()); mASB.initialize(dummyAsbSpecifier, asbParams); mASB.setup(_getComponentCasProcessorSpecifierMap(), getUimaContextAdmin(), flowControllerDecl,