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


Java FactoryConfigurationError.printStackTrace方法代码示例

本文整理汇总了Java中javax.xml.parsers.FactoryConfigurationError.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java FactoryConfigurationError.printStackTrace方法的具体用法?Java FactoryConfigurationError.printStackTrace怎么用?Java FactoryConfigurationError.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.xml.parsers.FactoryConfigurationError的用法示例。


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

示例1: createDOM

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
/**
 * Creates a DOM (Document Object Model) <code>Document<code>.
 */
private void createDOM() {
	try {
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = factory.newDocumentBuilder();

		//data is a Document
		Document data = builder.newDocument();
		Element root = data.createElement("measure");
		root.setAttribute("name", name);
		root.setAttribute("meanValue", "null");
		root.setAttribute("upperBound", "null");
		root.setAttribute("lowerBound", "null");
		root.setAttribute("progress", Double.toString(getSamplesAnalyzedPercentage()));
		root.setAttribute("data", "null");
		root.setAttribute("finished", "false");
		root.setAttribute("discarded", "0");
		root.setAttribute("precision", Double.toString(analyzer.getPrecision()));
		root.setAttribute("maxSamples", Double.toString(getMaxSamples()));
		data.appendChild(root);
	} catch (FactoryConfigurationError factoryConfigurationError) {
		factoryConfigurationError.printStackTrace();
	} catch (ParserConfigurationException e) {
		e.printStackTrace();
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:29,代码来源:Measure.java

示例2: parseFile

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
public boolean parseFile(InputSource var1) {
    try {
        this.init();
        SAXParserFactory var2 = SAXParserFactory.newInstance();
        var2.setValidating(false);
        SAXParser var3 = var2.newSAXParser();
        var3.parse(var1, this);
        return true;
    } catch (FactoryConfigurationError var4) {
        var4.printStackTrace();
    } catch (ParserConfigurationException var5) {
        var5.printStackTrace();
    } catch (SAXException var6) {
        var6.printStackTrace();
    } catch (IOException var7) {
        ;
    }

    return false;
}
 
开发者ID:cltl,项目名称:OntoTagger,代码行数:21,代码来源:FrameNetLuReader.java

示例3: getDocument

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
/**
 * Create and return a new xml DOM object parsed from the argument <code>URL</code>
 *
 * @param url the document <code>URL</code>
 * @return a new xml DOM object parsed from the argument <code>URL</code>, or 
 * <code>null</code> if one cannot be created.
 */
public static Document getDocument(URL url) {
    Document document = null;
    try {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        document = builder.parse(url.openStream());
    }
    // unable to get a document builder factory
    catch (FactoryConfigurationError fce) { 
        fce.printStackTrace(); 
    }
    // Parser with specified options can't be built
    catch (ParserConfigurationException pce) { 
        pce.printStackTrace(); 
    }
    // Errors generated during parsing
    catch (SAXException sxe) { 
        sxe.printStackTrace(); 
    } 
    catch (IOException ioe) { 
        ioe.printStackTrace(); 
    }
    return(document);
}
 
开发者ID:Norkart,项目名称:NK-VirtualGlobe,代码行数:32,代码来源:ImportUtils.java

示例4: createDOM

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
/**
 * Creates a DOM (Document Object Model) <code>Document<code> for XMLMeasureOutput.
 */
private void createDOM() {
	try {
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = factory.newDocumentBuilder();

		//data is a Document
		document = builder.newDocument();

		root = document.createElement("measureOutput");

		root.setAttribute("name", name);
		root.setAttribute("precision", Double.toString(measure.getAnalyzer().getPrecision()));
		root.setAttribute("alfa", Double.toString(measure.getAnalyzer().getAlfa()));
		root.setAttribute("maxSamples", Integer.toString(measure.getMaxSamples()));

		report = document.createElement("report");
		report.setAttribute("meanValue", "null");
		report.setAttribute("upperBound", "null");
		report.setAttribute("lowerBound", "null");
		report.setAttribute("finished", "false");
		report.setAttribute("successful", "false");
		report.setAttribute("isZero", "false");
		report.setAttribute("analyzedSamples", "0");
		report.setAttribute("discardedSamples", "0");

		root.appendChild(report);

		samples = document.createElement("samples");
	} catch (FactoryConfigurationError factoryConfigurationError) {
		factoryConfigurationError.printStackTrace();
	} catch (ParserConfigurationException e) {
		e.printStackTrace();
	}
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:38,代码来源:XMLMeasureOutput.java

示例5: createDOM

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
/**
 * Creates a DOM (Document Object Model) <code>Document<code>.
 */
private void createDOM() {
	try {
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = factory.newDocumentBuilder();

		//data is a Document
		data = builder.newDocument();

		Element root = data.createElement("measure");

		root.setAttribute("name", name);
		root.setAttribute("meanValue", "null");
		root.setAttribute("upperBound", "null");
		root.setAttribute("lowerBound", "null");
		root.setAttribute("progress", Double.toString(getSamplesAnalyzedPercentage()));
		root.setAttribute("data", "null");
		root.setAttribute("finished", "false");
		root.setAttribute("discarded", "0");
		root.setAttribute("precision", Double.toString(analyzer.getPrecision()));
		root.setAttribute("maxSamples", Double.toString(getMaxSamples()));

		data.appendChild(root);

	} catch (FactoryConfigurationError factoryConfigurationError) {
		factoryConfigurationError.printStackTrace();
	} catch (ParserConfigurationException e) {
		e.printStackTrace();
	}

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:34,代码来源:Measure.java

示例6: createDOM

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
/**
 * Creates a DOM (Document Object Model) <code>Document<code> for XMLMeasureOutput.
 */
private void createDOM() {
	try {
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = factory.newDocumentBuilder();

		//data is a Document
		document = builder.newDocument();

		root = document.createElement("measureOutput");

		root.setAttribute("name", name);
		root.setAttribute("precision", Double.toString(measure.getAnalyzer().getPrecision()));
		root.setAttribute("alfa", Double.toString(measure.getAnalyzer().getAlfa()));
		root.setAttribute("maxSamples", Integer.toString(measure.getMaxSamples()));

		report = document.createElement("report");
		report.setAttribute("meanValue", "null");
		report.setAttribute("upperBound", "null");
		report.setAttribute("lowerBound", "null");
		report.setAttribute("finished", "false");
		report.setAttribute("successful", "false");
		report.setAttribute("isZero", "false");
		report.setAttribute("analyzedSamples", "0");
		report.setAttribute("discardedSamples", "0");

		root.appendChild(report);

		samples = document.createElement("samples");

	} catch (FactoryConfigurationError factoryConfigurationError) {
		factoryConfigurationError.printStackTrace();
	} catch (ParserConfigurationException e) {
		e.printStackTrace();
	}

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:40,代码来源:XMLMeasureOutput.java

示例7: XmlParser

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
/**
 * Constructor allowing DTD validation of documents.
 *
 * @param resolver An entity resolver to use if validation is enabled.
 * @see #setValidating(boolean)
 */
public XmlParser(EntityResolver resolver) {
	this.entityResolver = resolver;
	result = new DefaultParseResult(this);
	try {
		spf = SAXParserFactory.newInstance();
	} catch (FactoryConfigurationError fce) {
		fce.printStackTrace();
	}
}
 
开发者ID:Thecarisma,项目名称:powertext,代码行数:16,代码来源:XmlParser.java

示例8: XmlParser

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
/**
 * Constructor allowing DTD validation of documents.
 * 
 * @param resolver An entity resolver to use if validation is enabled.
 * @see #setValidating(boolean)
 */
public XmlParser(EntityResolver resolver) {
	this.entityResolver = resolver;
	result = new DefaultParseResult(this);
	try {
		spf = SAXParserFactory.newInstance();
	} catch (FactoryConfigurationError fce) {
		fce.printStackTrace();
	}
}
 
开发者ID:curiosag,项目名称:ftc,代码行数:16,代码来源:XmlParser.java

示例9: XMLParser

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
public XMLParser(RSyntaxTextArea textArea) {
    this.textArea = textArea;
    result = new DefaultParseResult(this);
    try {
        spf = SAXParserFactory.newInstance();
    } catch (FactoryConfigurationError fce) {
        fce.printStackTrace();
    }
}
 
开发者ID:intuit,项目名称:Tank,代码行数:10,代码来源:XMLParser.java

示例10: XmlParser

import javax.xml.parsers.FactoryConfigurationError; //导入方法依赖的package包/类
public XmlParser(XmlLanguageSupport xls) {
	this.xls = xls;
	support = new PropertyChangeSupport(this);
	try {
		spf = SAXParserFactory.newInstance();
	} catch (FactoryConfigurationError fce) {
		fce.printStackTrace();
	}
}
 
开发者ID:bobbylight,项目名称:RSTALanguageSupport,代码行数:10,代码来源:XmlParser.java


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