Skip to content

Commit

Permalink
RDF-STaX: update stream type IRIs
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostrzyciel committed Oct 29, 2023
1 parent 413cfb9 commit 6b533c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/main/scala/util/MetadataReader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,6 @@ import org.apache.jena.vocabulary.RDF
import java.nio.file.Path
import scala.jdk.CollectionConverters.*

enum ElementType(val name: String):
case Graph extends ElementType("graph")
case Dataset extends ElementType("dataset")
case Triple extends ElementType("triple")
case Quad extends ElementType("quad")

enum StreamType(val iriName: String, val isFlat: Boolean, val elementType: ElementType):
lazy val iri = RdfUtil.pStax + iriName

case Graph extends StreamType("rdfGraphStream", false, ElementType.Graph)
case SubjectGraph extends StreamType("rdfSubjectGraphStream", false, ElementType.Graph)
case Dataset extends StreamType("rdfDatasetStream", false, ElementType.Dataset)
case NamedGraph extends StreamType("rdfNamedGraphStream", false, ElementType.Dataset)
case TimestampedNamedGraph extends StreamType("timestampedRdfNamedGraphStream", false, ElementType.Dataset)
case Triple extends StreamType("flatRdfTripleStream", true, ElementType.Triple)
case Quad extends StreamType("flatRdfQuadStream", true, ElementType.Quad)

case class MetadataInfo(
identifier: String = "",
description: String = "",
Expand Down
20 changes: 20 additions & 0 deletions src/main/scala/util/StreamType.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package io.github.riverbench.ci_worker
package util


enum ElementType(val name: String):
case Graph extends ElementType("graph")
case Dataset extends ElementType("dataset")
case Triple extends ElementType("triple")
case Quad extends ElementType("quad")

enum StreamType(val iriName: String, val isFlat: Boolean, val elementType: ElementType):
lazy val iri = RdfUtil.pStax + iriName

case Graph extends StreamType("graphStream", false, ElementType.Graph)
case SubjectGraph extends StreamType("subjectGraphStream", false, ElementType.Graph)
case Dataset extends StreamType("datasetStream", false, ElementType.Dataset)
case NamedGraph extends StreamType("namedGraphStream", false, ElementType.Dataset)
case TimestampedNamedGraph extends StreamType("timestampedNamedGraphStream", false, ElementType.Dataset)
case Triple extends StreamType("flatTripleStream", true, ElementType.Triple)
case Quad extends StreamType("flatQuadStream", true, ElementType.Quad)

0 comments on commit 6b533c1

Please sign in to comment.