-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from weso/master
Update from weso/srdf master
- Loading branch information
Showing
12 changed files
with
377 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
lazy val scala212 = "2.12.15" | ||
lazy val scala212 = "2.12.16" | ||
lazy val scala213 = "2.13.8" | ||
lazy val scala3 = "3.1.3" | ||
|
||
|
@@ -11,11 +11,11 @@ lazy val supportedScalaVersions = List( | |
val Java11 = JavaSpec.temurin("11") // "[email protected]" | ||
// val Java8 = JavaSpec.temurin("8") // "[email protected]" | ||
|
||
lazy val utilsVersion = "0.2.24" | ||
lazy val utilsVersion = "0.2.25" | ||
|
||
// Dependency versions | ||
lazy val catsVersion = "2.7.0" | ||
lazy val catsEffectVersion = "3.3.12" | ||
lazy val catsVersion = "2.8.0" | ||
lazy val catsEffectVersion = "3.3.14" | ||
lazy val circeVersion = "0.14.2" | ||
lazy val declineVersion = "2.2.0" | ||
lazy val fs2Version = "3.2.7" | ||
|
29 changes: 29 additions & 0 deletions
29
modules/srdf/src/main/scala/es/weso/rdf/nodes/RDFHTMLLiteral.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package es.weso.rdf.nodes | ||
import cats.implicits._ | ||
|
||
case class RDFHTMLLiteral(lexicalForm: String) extends Literal { | ||
val rdfSyntax = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
val RDFHTMLDatatypeIRI: IRI = IRI(rdfSyntax + "HTML") | ||
|
||
override val dataType: IRI = RDFHTMLDatatypeIRI | ||
|
||
override def isLangLiteral = false | ||
override def hasLang(lang: Lang) = false | ||
|
||
override def toString: String = { | ||
"\"" + lexicalForm + "\"^^rdf:HTML" | ||
} | ||
|
||
override def getLexicalForm = lexicalForm | ||
|
||
override def isEqualTo(other: RDFNode): Either[String, Boolean] = other match { | ||
case RDFHTMLLiteral(lf) => (lf == lexicalForm).asRight | ||
case _ => false.asRight | ||
} | ||
|
||
def lessThan(other: RDFNode): Either[String, Boolean] = other match { | ||
case RDFHTMLLiteral(lf) => (lexicalForm < lf).asRight | ||
case _ => | ||
s"Cannot compare RDF HTML literal $this < $other which is not an RDF HTML literal".asLeft | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
modules/srdf/src/main/scala/es/weso/rdf/nodes/RDFXMLLiteral.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package es.weso.rdf.nodes | ||
import cats.implicits._ | ||
|
||
case class RDFXMLLiteral(lexicalForm: String) extends Literal { | ||
val rdfSyntax = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
val RDFXMLDatatypeIRI: IRI = IRI(rdfSyntax + "XMLLiteral") | ||
|
||
override val dataType: IRI = RDFXMLDatatypeIRI | ||
|
||
override def isLangLiteral = false | ||
override def hasLang(lang: Lang) = false | ||
|
||
override def toString: String = { | ||
"\"" + lexicalForm + "\"^^rdf:XMLLiteral" | ||
} | ||
|
||
override def getLexicalForm = lexicalForm | ||
|
||
override def isEqualTo(other: RDFNode): Either[String, Boolean] = other match { | ||
case RDFXMLLiteral(lf) => (lf == lexicalForm).asRight | ||
case _ => false.asRight | ||
} | ||
|
||
def lessThan(other: RDFNode): Either[String, Boolean] = other match { | ||
case RDFXMLLiteral(lf) => (lexicalForm < lf).asRight | ||
case _ => | ||
s"Cannot compare RDF HTML literal $this < $other which is not an RDF HTML literal".asLeft | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.