package cex
Provides an object for parsing citable resources in CEX serialization. See https://github.com/cite-architecture/citedx for documentation of the CEX format.
Overview
The main class is the CexParser. It is constructucted from a string in CEX format, and provides functions for working with distinct blocks of the data source. For example:
val cex = CexParser(cexSourceString) // get a map of all blocks labels to a Vector of one or // more string data sets: val blockMap = cex.blockMap // get a single string concatenating all data for a single // block type: val ctsCatalog = cex.blockString("ctscatalog")
In the JVM environment, the CexParserSource object provides a single-step factory function for creating parsers from files:
val cex = CexParserSource.fromFile("filename.cex")
- Alphabetic
- By Inheritance
- cex
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
CexParser(rawCex: String) extends Product with Serializable
A CEX parser making blocks of a CEX String available as a named map of label -> vectors of data.
A CEX parser making blocks of a CEX String available as a named map of label -> vectors of data.
- rawCex
CEX data to parse.
- Annotations
- @JSExportAll()
Value Members
-
val
labels: Set[String]
Exhaustive set of valid labels for CEX blocks.
-
object
CexParserSource extends LogSupport
Factory for creating CexParsers for CEX data accessible from JVM-specific sources.
-
object
DataCollector extends LogSupport
Utility objectn