Package org.openrdf.query.resultio.sparqlxml

Examples of org.openrdf.query.resultio.sparqlxml.SPARQLBooleanXMLWriter


    private Templates stylesheet;

    public SPARQLBooleanHTMLWriter(OutputStream out) {
        this.out = out;
        this.xmlOut = new ByteArrayOutputStream();
        this.writer = new SPARQLBooleanXMLWriter(xmlOut);

        Source s_stylesheet = new StreamSource(SPARQLBooleanHTMLWriter.class.getResourceAsStream("style.xsl"));
        try {
            stylesheet = TransformerFactory.newInstance().newTemplates(s_stylesheet);
        } catch (TransformerConfigurationException e) {
View Full Code Here


    private BooleanQueryResultWriter getBooleanResultWriter(String format, OutputStream os) {
        //build outputwriter
        final BooleanQueryResultWriter out;
        if(format == null) {
            out = new SPARQLBooleanXMLWriter(os);
        } else if(parseSubType(format).equals("html")) {
            out = new SPARQLBooleanHTMLWriter(os);
        } else if(parseSubType(format).equals("json")) {
            out = new SPARQLBooleanJSONWriter(os);
        } else if(parseSubType(format).equals("xml")) {
            out = new SPARQLBooleanXMLWriter(os);
        } else if(parseSubType(format).equals("csv")) {
            out = new BooleanTextWriter(os);
        } else throw new InvalidArgumentException("could not produce format "+format);
        return out;
    }
View Full Code Here

    private Templates stylesheet;

    public SPARQLBooleanHTMLWriter(OutputStream out) {
        this.out = out;
        this.xmlOut = new ByteArrayOutputStream();
        this.xmlWriter = new SPARQLBooleanXMLWriter(xmlOut);

        Source s_stylesheet = new StreamSource(SPARQLBooleanHTMLWriter.class.getResourceAsStream("style.xsl"));
        try {
            stylesheet = TransformerFactory.newInstance().newTemplates(s_stylesheet);
        } catch (TransformerConfigurationException e) {
View Full Code Here

    private BooleanQueryResultWriter getBooleanResultWriter(String format, OutputStream os) {
        //build outputwriter
        final BooleanQueryResultWriter out;
        if(format == null) {
            out = new SPARQLBooleanXMLWriter(os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("html")) {
            out = new SPARQLBooleanHTMLWriter(os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("json")) {
            out = new SPARQLBooleanJSONWriter(os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("xml")) {
            out = new SPARQLBooleanXMLWriter(os);
        } else if(SparqlWritersHelper.parseSubType(format).equals("csv")) {
            out = new BooleanTextWriter(os);
        } else throw new InvalidArgumentException("could not produce format "+format);
        return out;
    }
View Full Code Here

TOP

Related Classes of org.openrdf.query.resultio.sparqlxml.SPARQLBooleanXMLWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.