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


Java ARQException类代码示例

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


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

示例1: visit

import org.apache.jena.sparql.ARQException; //导入依赖的package包/类
@Override
public void visit(P_NegPropSet pathNotOneOf) {
    List<P_Path0> props = pathNotOneOf.getNodes();
    if (props.size() == 0) {
        throw new ARQException("Bad path element: NotOneOf found with no elements");
    }
    out.print("!");
    if (props.size() == 1) {
        output(props.get(0));
    } else {
        out.print("(");
        boolean first = true;
        for (P_Path0 p : props) {
            if (!first) {
                out.print("|");
            }
            first = false;
            output(p);
        }
        out.print(")");
    }
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:23,代码来源:SPARQLGeneratePathWriter.java

示例2: testSmallInputWithRunawayQuote

import org.apache.jena.sparql.ARQException; //导入依赖的package包/类
@Ignore("This doesn't work with OpenCSV 3.8, but works with cygri's fork on GitHub")
@Test public void testSmallInputWithRunawayQuote() {
	System.out.println("testInput5GBWithRunawayQuote");
	final int lines = 20000;
	String query = "SELECT * {}";
	ResultSet rs = prepare(query, new DummyContentSource(lines) {
		@Override
		public String generateNonHeaderLine(int lineNumber) {
			if (lineNumber == 11111) {
				return super.generateNonHeaderLine(lineNumber) + "\"";
			}
			return super.generateNonHeaderLine(lineNumber);
		}
	}).execSelect();
	try {
		consume(rs);
		fail("Should have thrown ARQException due to runaway quote");
	} catch (ARQException ex) {
		if (!ex.getMessage().contains("stray quote")) {
			throw ex;
		}
	}
}
 
开发者ID:tarql,项目名称:tarql,代码行数:24,代码来源:LargeInputTest.java

示例3: testInput5GBWithRunawayQuote

import org.apache.jena.sparql.ARQException; //导入依赖的package包/类
@Ignore("This doesn't work with OpenCSV 3.8, but works with cygri's fork on GitHub")
@Test public void testInput5GBWithRunawayQuote() {
	System.out.println("testInput5GBWithRunawayQuote");
	final int lines = 50000000;
	String query = "SELECT * {}";
	ResultSet rs = prepare(query, new DummyContentSource(lines) {
		@Override
		public String generateNonHeaderLine(int lineNumber) {
			if (lineNumber == 11111) {
				return super.generateNonHeaderLine(lineNumber) + "\"";
			}
			return super.generateNonHeaderLine(lineNumber);
		}
	}).execSelect();
	try {
		consume(rs);
		fail("Should have thrown ARQException due to runaway quote");
	} catch (ARQException ex) {
		if (!ex.getMessage().contains("stray quote")) {
			throw ex;
		}
	}
}
 
开发者ID:tarql,项目名称:tarql,代码行数:24,代码来源:LargeInputTest.java

示例4: addTriplePath

import org.apache.jena.sparql.ARQException; //导入依赖的package包/类
@Override
public void addTriplePath(TriplePath path) {
    throw new ARQException("Triples-only collector");
}
 
开发者ID:thesmartenergy,项目名称:sparql-generate,代码行数:5,代码来源:ElementGenerateTriplesBlock.java


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