{
try {
log.println("Checking RDFa gunk...");
String content = "behold, for i am the content.";
XTextRange xTR = new TestRange(content);
Statement[] result = xRep.getStatementRDFa((XMetadatable)xTR);
assure("RDFa: get: not empty (initial)",
0 == result.length);
try {
xRep.setStatementRDFa(foo, bar, null, "", null);
assure("RDFa: set: null", false);
} catch (IllegalArgumentException e) {
// ignore
}
XLiteral trlit = Literal.create(xContext, content);
Statement x_FooBarTRLit = new Statement(foo, bar, trlit, null);
xRep.setStatementRDFa(foo, bar, xTR, "", null);
result = xRep.getStatementRDFa((XMetadatable)xTR);
assure("RDFa: get: without content",
1 == result.length && eq((Statement)result[0], x_FooBarTRLit));
//FIXME: do this?
xTR.setString(lit.getStringValue());
/*
Statement xFooBarLit = new Statement(foo, bar, lit, null);
result = xRep.getStatementRDFa((XMetadatable)xTR);
assure("RDFa: get: change",
eq((Statement)result.First, xFooBarLit) && null == result.Second);
*/
Statement x_FooBarLittype = new Statement(foo, bar, littype, null);
Statement x_FooLabelLit = new Statement(foo, rdfslabel, lit, null);
xRep.setStatementRDFa(foo, bar, xTR, "42", uint);
result = xRep.getStatementRDFa((XMetadatable)xTR);
assure("RDFa: get: with content",
2 == result.length && eq((Statement)result[0], x_FooBarLittype)
&& eq((Statement)result[1], x_FooLabelLit));
//FIXME: do this?
xTR.setString(content);
/*
Statement xFooLabelTRLit = new Statement(foo, rdfslabel, trlit, null);
result = xRep.getStatementRDFa((XMetadatable)xTR);
assure("RDFa: get: change (label)",
eq((Statement)result.First, xFooBarLittype) &&