use of org.eclipse.rdf4j.query.algebra.InsertData in project rdf4j by eclipse.
the class SPARQLParserTest method testLongUnicode.
@Test
public void testLongUnicode() throws Exception {
ParsedUpdate ru = parser.parseUpdate("insert data {<urn:test:foo> <urn:test:bar> \"\\U0001F61F\" .}", "urn:test");
InsertData insertData = (InsertData) ru.getUpdateExprs().get(0);
String[] lines = insertData.getDataBlock().split("\n");
assertEquals("\uD83D\uDE1F", lines[lines.length - 1].replaceAll(".*\"(.*)\".*", "$1"));
}
use of org.eclipse.rdf4j.query.algebra.InsertData in project rdf4j by eclipse.
the class UpdateExprBuilder method visit.
@Override
public InsertData visit(ASTInsertData node, Object data) throws VisitorException {
ASTUnparsedQuadDataBlock dataBlock = node.jjtGetChild(ASTUnparsedQuadDataBlock.class);
InsertData insertData = new InsertData(dataBlock.getDataBlock());
insertData.setLineNumberOffset(dataBlock.getAddedDefaultPrefixes());
return insertData;
}
Aggregations