public TypePriorities parseTypePriorities(XMLInputSource aInput, ParsingOptions aOptions) throws InvalidXMLException { // attempt to locate resource specifier schema XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, SCHEMA_URL, aOptions); if (object instanceof TypePriorities) { return (TypePriorities) object; } else { throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] { TypePriorities.class.getName(), object.getClass().getName() }); } }
public static TypeSystemDescription createTypeSystemDescription(InputStream in) { // Note: // Type System location is not set correctly, // resolving a referenced type system will fail XMLInputSource xmlTypeSystemSource = new XMLInputSource(in, new File("")); XMLParser xmlParser = UIMAFramework.getXMLParser(); TypeSystemDescription typeSystemDesciptor; try { typeSystemDesciptor = (TypeSystemDescription) xmlParser .parse(xmlTypeSystemSource); typeSystemDesciptor.resolveImports(); } catch (InvalidXMLException e) { e.printStackTrace(); typeSystemDesciptor = null; } return typeSystemDesciptor; }
if (InvalidXMLException.INVALID_DESCRIPTOR_FILE.equals(e.getMessageKey())) { Throwable cause = e.getCause(); if ((cause instanceof InvalidXMLException) && InvalidXMLException.UNKNOWN_ELEMENT.equals(((InvalidXMLException)cause).getMessageKey()) && (null == extensionEditor)) { extensionEditor = getRequiredEditor((String)((InvalidXMLException)cause).getArguments()[0]); if (null != extensionEditor) { e.printStackTrace(); Utility.popMessage(Messages.getString("MultiPageEditor.XMLerrorInDescriptorTitle"), //$NON-NLS-1$ Messages.getString("MultiPageEditor.XMLerrorInDescriptor") + "\n" + getMessagesToRootCause(e), //$NON-NLS-1$ //$NON-NLS-2$
dlgSpecifier = xmlParser.parseResourceSpecifier(xmlSource); } catch (InvalidXMLException xmlExc) { String msgKey = xmlExc.getMessageKey(); throw new IllegalArgumentException(xmlExc.toString()); else
public static String resolveByName(String input) { ResourceManager resourceManager = UIMAFramework.newDefaultResourceManager(); Import theImport = new Import_impl(); theImport.setName(input); try { return theImport.findAbsoluteUrl(resourceManager).toExternalForm(); } catch (InvalidXMLException e) { if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.SEVERE)) { UIMAFramework.getLogger(CLASS_NAME).logrb(Level.SEVERE, XsltImportByName.class.getName(), "resolveByName", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__SEVERE", e.toString()); } return null; } }
} catch ( InvalidXMLException ixmlE ) { System.err.println( "Couldn't parse cpe xml " + args[0] ); System.err.println( " " + ixmlE.getLocalizedMessage() ); System.exit( 1 );
frame.viewDocuments(); } catch (InvalidXMLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace();
} catch ( InvalidXMLException ixmlE ) { System.err.println( "Couldn't parse cpe xml " + args[0] ); System.err.println( " " + ixmlE.getLocalizedMessage() ); System.exit( 1 );
public CustomResourceSpecifier parseCustomResourceSpecifier(XMLInputSource aInput, ParsingOptions aOptions) throws InvalidXMLException { // attempt to locate resource specifier schema XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, SCHEMA_URL, aOptions); if (object instanceof CustomResourceSpecifier) { return (CustomResourceSpecifier) object; } else { throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] { CustomResourceSpecifier.class.getName(), object.getClass().getName() }); } }
/** * Gets the absolute UR lfrom import. * * @param importItem the import item * @return the absolute UR lfrom import */ private URL getAbsoluteURLfromImport(Import importItem) { try { // if by location, it's relative to the descriptor. return Platform.asLocalURL(importItem.findAbsoluteUrl(createResourceManager())); } catch (InvalidXMLException ex) { ex.printStackTrace(); } catch (IOException e) { } return null; }
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); }
frame.setTitle("CPE Configurator: " + args[0]); } catch (InvalidXMLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace();
public ResourceManagerConfiguration parseResourceManagerConfiguration(XMLInputSource aInput, ParsingOptions aOptions) throws InvalidXMLException { // attempt to locate resource specifier schema XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, SCHEMA_URL, aOptions); if (object instanceof ResourceManagerConfiguration) { return (ResourceManagerConfiguration) object; } else { throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] { ResourceManagerConfiguration.class.getName(), object.getClass().getName() }); } }
} catch (InvalidXMLException e) { e.printStackTrace(); } catch (IOException e) {
public FlowControllerDescription parseFlowControllerDescription(XMLInputSource aInput, ParsingOptions aOptions) throws InvalidXMLException { // attempt to locate resource specifier schema XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, SCHEMA_URL, aOptions); if (object instanceof FlowControllerDescription) { return (FlowControllerDescription) object; } else { throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] { FlowControllerDescription.class.getName(), object.getClass().getName() }); } }
e.printStackTrace(); } catch (InvalidXMLException e) { e.printStackTrace(); } catch (ResourceInitializationException e) { e.printStackTrace();
public PearSpecifier parsePearSpecifier(XMLInputSource aInput, ParsingOptions aOptions) throws InvalidXMLException { // attempt to locate resource specifier schema XMLizable object = parse(aInput, RESOURCE_SPECIFIER_NAMESPACE, SCHEMA_URL, aOptions); if (object instanceof PearSpecifier) { return (PearSpecifier) object; } else { throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] { PearSpecifier.class.getName(), object.getClass().getName() }); } }
/** * @see org.apache.axis.encoding.Deserializer#valueComplete() */ public void valueComplete() throws SAXException { // System.out.println("AxisResourceServiceDeserializer::valueComplete"); if (mNesting == 0) { // System.out.println("Building value"); mDeser.endDocument(); try { Object val = mDeser.getObject(); // System.out.println("Value is: " + val); // value = val; setValue(val); } catch (InvalidXMLException e) { e.printStackTrace(); setValue(null); } // call superclass to register the deserialized object super.valueComplete(); } } }
public IndexBuildSpecification parseIndexBuildSpecification(XMLInputSource aInput, ParsingOptions aOptions) throws InvalidXMLException { XMLizable object = parse(aInput, aOptions); if (object instanceof IndexBuildSpecification) { return (IndexBuildSpecification) object; } else { throw new InvalidXMLException(InvalidXMLException.INVALID_CLASS, new Object[] { IndexBuildSpecification.class.getName(), object.getClass().getName() }); } }
/** * @see org.apache.axis.encoding.Deserializer#valueComplete() */ public void valueComplete() throws SAXException { // System.out.println("AxisResourceServiceDeserializer::valueComplete"); if (mNesting == 0) { // System.out.println("Building value"); mDeser.endDocument(); try { Object val = mDeser.getObject(); // System.out.println("Value is: " + val); // value = val; setValue(val); } catch (InvalidXMLException e) { e.printStackTrace(); setValue(null); } // call superclass to register the deserialized object super.valueComplete(); } } }