本文整理汇总了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(")");
}
}
示例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;
}
}
}
示例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;
}
}
}
示例4: addTriplePath
import org.apache.jena.sparql.ARQException; //导入依赖的package包/类
@Override
public void addTriplePath(TriplePath path) {
throw new ARQException("Triples-only collector");
}