diff options
author | Michael Stahl <mst@openoffice.org> | 2010-03-15 11:34:42 +0100 |
---|---|---|
committer | Michael Stahl <mst@openoffice.org> | 2010-03-15 11:34:42 +0100 |
commit | 7e619ffe397e2b607b31488cd70836a0d600c5cc (patch) | |
tree | dbb20501d768f9f32988638f67ee42a6444f581e /unoxml/qa/complex | |
parent | 7743d0f0a9357e08af3eba7868c4e1c713365d30 (diff) |
odfmetadata4: #i110033#: API change: remove rdfs:label statements for RDFa.
css.rdf.XDocumentRepository: method getStatementRDFa() also returns a bool.
librdf_repository:
setStatementRDFa() no longer generates the rdfs:label statement.
getStatementRDFa() no longer handles the rdfs:label statement.
add a set to store elements with xhtml:content.
RDFaExportHelper:
adapt export to new getStatementRDFa() and lack of rdfs:label statement.
Diffstat (limited to 'unoxml/qa/complex')
-rw-r--r-- | unoxml/qa/complex/RDFRepositoryTest.java | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/unoxml/qa/complex/RDFRepositoryTest.java b/unoxml/qa/complex/RDFRepositoryTest.java index 52f37c40dad6..f3f9cbd8ae41 100644 --- a/unoxml/qa/complex/RDFRepositoryTest.java +++ b/unoxml/qa/complex/RDFRepositoryTest.java @@ -42,6 +42,7 @@ import com.sun.star.lang.WrappedTargetException; import com.sun.star.lang.WrappedTargetRuntimeException; import com.sun.star.beans.XPropertySet; import com.sun.star.beans.PropertyValue; +import com.sun.star.beans.Pair; import com.sun.star.beans.StringPair; import com.sun.star.container.XEnumeration; import com.sun.star.container.ElementExistException; @@ -460,9 +461,10 @@ public class RDFRepositoryTest extends ComplexTestCase XTextRange xTR = new TestRange(content); XMetadatable xM = (XMetadatable) xTR; - Statement[] result = xRep.getStatementRDFa((XMetadatable)xTR); + Pair<Statement[], Boolean> result = + xRep.getStatementRDFa((XMetadatable)xTR); assure("RDFa: get: not empty (initial)", - 0 == result.length); + 0 == result.First.length); try { xRep.setStatementRDFa(foo, new XURI[] {}, xM, "", null); @@ -484,7 +486,8 @@ public class RDFRepositoryTest extends ComplexTestCase result = xRep.getStatementRDFa((XMetadatable)xTR); assure("RDFa: get: without content", - 1 == result.length && eq((Statement)result[0], x_FooBarTRLit)); + !result.Second && (1 == result.First.length) + && eq((Statement)result.First[0], x_FooBarTRLit)); //FIXME: do this? xTR.setString(lit.getStringValue()); @@ -496,13 +499,13 @@ public class RDFRepositoryTest extends ComplexTestCase */ Statement x_FooBarLittype = new Statement(foo, bar, littype, null); - Statement x_FooLabelLit = new Statement(foo, rdfslabel, lit, null); xRep.setStatementRDFa(foo, new XURI[] { bar }, xM, "42", uint); result = xRep.getStatementRDFa((XMetadatable)xTR); assure("RDFa: get: with content", - 2 == result.length && eq((Statement)result[0], x_FooLabelLit) - && eq((Statement)result[1], x_FooBarLittype)); + result.Second && + (1 == result.First.length) && + eq((Statement)result.First[0], x_FooBarLittype)); //FIXME: do this? xTR.setString(content); @@ -518,7 +521,7 @@ public class RDFRepositoryTest extends ComplexTestCase result = xRep.getStatementRDFa((XMetadatable)xTR); assure("RDFa: get: not empty (removed)", - 0 == result.length); + 0 == result.First.length); xRep.setStatementRDFa(foo, new XURI[] { foo, bar, baz }, xM, "", null); @@ -527,14 +530,15 @@ public class RDFRepositoryTest extends ComplexTestCase Statement x_FooBazTRLit = new Statement(foo, baz, trlit, null); result = xRep.getStatementRDFa((XMetadatable) xTR); assure("RDFa: get: without content (multiple predicates, reinsert)", - eq(result, new Statement[] { + !result.Second && + eq(result.First, new Statement[] { x_FooFooTRLit, x_FooBarTRLit, x_FooBazTRLit })); xRep.removeStatementRDFa((XMetadatable)xTR); result = xRep.getStatementRDFa((XMetadatable) xTR); assure("RDFa: get: not empty (re-removed)", - 0 == result.length); + 0 == result.First.length); log.println("...done"); |