public void setLoadTrimTextBuffer(boolean b) { if (b) super.setLoadTrimTextBuffer(); else remove( LOAD_TRIM_TEXT_BUFFER ); }
public void setLoadTrimTextBuffer(boolean b) { if (b) super.setLoadTrimTextBuffer(); else remove( LOAD_TRIM_TEXT_BUFFER ); }
public void setLoadTrimTextBuffer(boolean b) { if (b) super.setLoadTrimTextBuffer(); else remove( LOAD_TRIM_TEXT_BUFFER ); }
/** * Initializes a WPS client session. * */ private WPSClientSession() { options = new XmlOptions(); options.setLoadStripWhitespace(); options.setLoadTrimTextBuffer(); loggedServices = new HashMap<String, CapabilitiesDocument>(); processDescriptions = new HashMap<String, ProcessDescriptionsDocument>(); }
private ProcessDescriptionType loadProcessDescription(File describeProcessFile){ try { InputStream xmlDesc = new FileInputStream(describeProcessFile); XmlOptions option = new XmlOptions(); option.setLoadTrimTextBuffer(); ProcessDescriptionsDocument doc = ProcessDescriptionsDocument.Factory.parse(xmlDesc, option); if(doc.getProcessDescriptions().getProcessDescriptionArray().length == 0) { LOGGER.warn("ProcessDescription is empty! " + describeProcessFile.getName()); return null; } return doc.getProcessDescriptions().getProcessDescriptionArray(0); } catch(IOException e) { LOGGER.warn("Could not initialize algorithm, parsing error! " + describeProcessFile.getName(), e); } catch(XmlException e) { LOGGER.warn("Could not initialize algorithm, parsing error! " + describeProcessFile.getName(), e); } return null; }
private static ProcessDescriptionType createProcessDescription (File describeProcessFile){ try { InputStream xmlDesc = new FileInputStream(describeProcessFile); XmlOptions option = new XmlOptions(); option.setLoadTrimTextBuffer(); ProcessDescriptionsDocument doc = ProcessDescriptionsDocument.Factory.parse(xmlDesc, option); if(doc.getProcessDescriptions().getProcessDescriptionArray().length == 0) { LOGGER.warn("ProcessDescription is empty!"); return null; } return doc.getProcessDescriptions().getProcessDescriptionArray(0); } catch(IOException e) { LOGGER.warn("Could not initialize algorithm, parsing error! ", e); } catch(XmlException e) { LOGGER.warn("Could not initialize algorithm, parsing error! ", e); } return null; }
private XmlSecurityConfigDocument init(InputStream configStream) { try { return XmlSecurityConfigDocument.Factory.parse(configStream, new XmlOptions().setLoadStripComments() .setLoadStripProcinsts().setLoadStripWhitespace().setLoadTrimTextBuffer()); } catch (Exception e) { throw new ConfigurationException("input stream can't be parsed to a SecurityConfig document :" + e, e); } }
/** * Creates an ExecuteRequest based on a Document (HTTP_POST) * * @param doc * The clients submission * @throws ExceptionReport */ public ExecuteRequest(Document doc) throws ExceptionReport { super(doc); try { XmlOptions option = new XmlOptions(); option.setLoadTrimTextBuffer(); this.execDom = ExecuteDocument.Factory.parse(doc, option); if (this.execDom == null) { LOGGER.error("ExecuteDocument is null"); throw new ExceptionReport("Error while parsing post data", ExceptionReport.MISSING_PARAMETER_VALUE); } } catch (XmlException e) { throw new ExceptionReport("Error while parsing post data", ExceptionReport.MISSING_PARAMETER_VALUE, e); } // validate the client input validate(); // create an initial response execRespType = new ExecuteResponseBuilder(this); storeRequest(execDom); }