当前位置: 首页>>代码示例>>Java>>正文


Java DOMHelperException类代码示例

本文整理汇总了Java中org.vast.xml.DOMHelperException的典型用法代码示例。如果您正苦于以下问题:Java DOMHelperException类的具体用法?Java DOMHelperException怎么用?Java DOMHelperException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


DOMHelperException类属于org.vast.xml包,在下文中一共展示了DOMHelperException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setInput

import org.vast.xml.DOMHelperException; //导入依赖的package包/类
@Override
   public void setInput(InputStream inputStream) throws IOException
{
	try
	{
		this.dom = new DOMHelper(inputStream, false);
	}
	catch (DOMHelperException e)
	{
		throw new XMLReaderException("Error while parsing XML stream", e);
	}
}
 
开发者ID:sensiasoft,项目名称:lib-swe-common,代码行数:13,代码来源:XmlDataParserDOM.java

示例2: readXMLQuery

import org.vast.xml.DOMHelperException; //导入依赖的package包/类
public RequestType readXMLQuery(InputStream input) throws OWSException
{
	try
	{
           DOMHelper dom = new DOMHelper(input, false);
		return readXMLQuery(dom, dom.getBaseElement());
	}
	catch (DOMHelperException e)
	{
		throw new OWSException("Cannot read XML request", e);
	}
}
 
开发者ID:sensiasoft,项目名称:lib-ows,代码行数:13,代码来源:AbstractRequestReader.java

示例3: readXMLResponse

import org.vast.xml.DOMHelperException; //导入依赖的package包/类
public ResponseType readXMLResponse(InputStream input) throws OWSException
{
	try
	{
           DOMHelper dom = new DOMHelper(input, false);
		return readXMLResponse(dom, dom.getBaseElement());
	}
	catch (DOMHelperException e)
	{
		throw new OWSException("Cannot read XML response", e);
	}
}
 
开发者ID:sensiasoft,项目名称:lib-ows,代码行数:13,代码来源:AbstractResponseReader.java

示例4: readXMLQuery

import org.vast.xml.DOMHelperException; //导入依赖的package包/类
/**
   * Helper method to parse any OWS query directly from an InputStream
   * @param is input stream containing the XML document to read from
   * @param serviceType service type to check if service parameter in query is correct 
   * @return OWS request object filled with all parameters parsed from XML request
   * @throws OWSException 
   */
  public OWSRequest readXMLQuery(InputStream is, String serviceType) throws OWSException
  {
  	try
{
	DOMHelper dom = new DOMHelper(is, false);
	OWSRequest request = readXMLQuery(dom, dom.getRootElement(), serviceType);
	return request;
}
catch (DOMHelperException e)
{
	throw new OWSException(AbstractRequestReader.invalidXML, e);
}
  }
 
开发者ID:sensiasoft,项目名称:lib-ows,代码行数:21,代码来源:OWSUtils.java

示例5: readXMLResponse

import org.vast.xml.DOMHelperException; //导入依赖的package包/类
/**
 * Helper method to parse any OWS response directly from an InputStream
 * @param is input stream to read from
 * @param serviceType type of OGC service sending the response
 * @param responseType type of response to read (get it from 
 * @return OWS response object
 * @throws OWSException
 */
public OWSResponse readXMLResponse(InputStream is, String serviceType, String responseType) throws OWSException
{
    try
    {
        DOMHelper dom = new DOMHelper(is, false);
        OWSResponse resp = readXMLResponse(dom, dom.getRootElement(), serviceType, responseType);
        return resp;
    }
    catch (DOMHelperException e)
    {
        throw new OWSException(AbstractResponseReader.invalidXML, e);
    }
}
 
开发者ID:sensiasoft,项目名称:lib-ows,代码行数:22,代码来源:OWSUtils.java

示例6: loadMaps

import org.vast.xml.DOMHelperException; //导入依赖的package包/类
/**
 * Loads the URI to Process Class map using the provided XML file.
 * Existing entries are replaced only if the replace argument is true.
 * @param libFileUrl Url to the file containing the mapping definitions
 * @param replace If true, existing entries are replaced
 * @throws SMLException
 */
public static synchronized void loadMaps(String libFileUrl, boolean replace) throws SMLException
{
    try
    {
        // create process hashtable entries
        DOMHelper dom = new DOMHelper(libFileUrl, false);
        NodeList processElts = dom.getElements("Process");
        
        if (processMap == null)
            processMap = new HashMap<String,String>(processElts.getLength());
        
        for (int i=0; i<processElts.getLength(); i++)
        {
            Element processElt = (Element)processElts.item(i);
            String className = dom.getElementValue(processElt, "class");
            
            NodeList uriElts = dom.getElements(processElt, "uri");         
            for (int j=0; j<uriElts.getLength(); j++)
            {
                Element uriElt = (Element)uriElts.item(j);
                String uri = dom.getElementValue(uriElt, "");                    
                
                if (replace || (processMap.get(uri) == null))
                    processMap.put(uri, className);
            }
        }
    }
    catch (DOMHelperException e)
    {
        throw new SMLException("Error while reading Process Map File", e);
    }
}
 
开发者ID:sensiasoft,项目名称:lib-sensorml,代码行数:40,代码来源:ProcessLoader.java


注:本文中的org.vast.xml.DOMHelperException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。