@@ -9,6 +9,10 @@ import cats._
99import cats .implicits ._
1010import scala .jdk .CollectionConverters ._
1111import org .apache .jena .datatypes .RDFDatatype
12+ import org .apache .jena .datatypes .xsd .impl .RDFhtml
13+ import org .apache .jena .datatypes .BaseDatatype
14+ import java .io .InputStream
15+ import java .io .ByteArrayInputStream
1216
1317class JenaMapperTest extends CatsEffectSuite with JenaBased {
1418
@@ -162,33 +166,5 @@ class JenaMapperTest extends CatsEffectSuite with JenaBased {
162166 assertEquals(checkIsomorphic(model1, model2), ().asRight)
163167 }
164168
165- // Test added at issue: https://github.com/weso/srdf/issues/292
166- test(" Should compare one triple with a rdf:HTML literal" .only) {
167- val ts = Set (
168- RDFTriple (
169- IRI (" http://example.org#a" ),
170- IRI (" http://example.org#p" ),
171- RDFHTMLLiteral (" <div>Test HTML markup</div>" )))
172- val s =
173- """ |@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
174- |<http://example.org#a> <http://example.org#p> "<div>Test HTML markup</div>"^^rdf:HTML .""" .stripMargin
175- println(s " ts: $ts" )
176- val empty = ModelFactory .createDefaultModel
177- val model1 = RDFTriples2Model (ts, empty, None )
178- val model2 = str2model(s)
179- val s1 = model1.listSubjects().toList().asScala.head
180- val s2 = model2.listSubjects().toList().asScala.head
181- println(s " Subject1 = $s1, ${s1.getClass().getName()}" )
182- println(s " Subject2 = $s2, ${s2.getClass().getName()}" )
183- println(s " Are equal? ${s1.equals(s2)}" )
184-
185- val o1dt = model1.listObjects().toList().asScala.head.asLiteral().getDatatype()
186- val o2dt = model2.listObjects().toList().asScala.head.asLiteral().getDatatype()
187- println(s " Object1 = $o1dt, ${o1dt.getClass().getName()}" )
188- println(s " Object2 = $o2dt, ${o2dt.getClass().getName()}" )
189- println(s " Are equal? ${o1dt.equals(o2dt)}" )
190-
191- assertEquals(checkIsomorphic(model1, model2), ().asRight)
192- }
193169
194170}
0 commit comments