當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。