object NQuadsReader
An N-Quads reader. One quad per line is assumed.
- Alphabetic
- By Inheritance
- NQuadsReader
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
load(env: ExecutionEnvironment, path: String, stopOnBadTerm: ErrorParseMode.Value = ErrorParseMode.STOP, stopOnWarnings: WarningParseMode.Value = WarningParseMode.IGNORE, checkRDFTerms: Boolean = false, errorLog: Logger = ErrorHandlerFactory.stdLogger): DataSet[Triple]
Loads N-Quads data from a file or directory into a DataSet.
Loads N-Quads data from a file or directory into a DataSet. The path can also contain multiple paths and even wildcards, e.g.
"/my/dir1,/my/paths/part-00[0-5]*,/another/dir,/a/specific/file"Handling of errors
By default, it stops once a parse error occurs, i.e. a org.apache.jena.riot.RiotException will be thrown generated by the underlying parser.
The following options exist:
- STOP the whole data loading process will be stopped and a
org.apache.jena.net.sansa_stack.rdf.spark.riot.RiotExceptionwill be thrown - SKIP the line will be skipped but the data loading process will continue, an error message will be logged
Handling of warnings
If the additional checking of RDF terms is enabled, warnings during parsing can occur. For example, a wrong lexical form of a literal w.r.t. to its datatype will lead to a warning.
The following can be done with those warnings:
- IGNORE the warning will just be logged to the configured logger
- STOP similar to the error handling mode, the whole data loading process will be stopped and a org.apache.jena.riot.RiotException will be thrown
- SKIP similar to the error handling mode, the line will be skipped but the data loading process will continue
Checking of RDF terms
Set whether to perform checking of NTriples - defaults to no checking.
Checking adds warnings over and above basic syntax errors. This can also be used to turn warnings into exceptions if the option
stopOnWarningsis set to STOP or SKIP.- IRIs - whether IRIs confirm to all the rules of the IRI scheme
- Literals: whether the lexical form conforms to the rules for the datatype.
- Quads: check slots have a valid kind of RDF term (parsers usually make this a syntax error anyway).
See also the optional
errorLogargument to control the output. The default is to log.- env
the Spark session
- path
the path to the N-Quads file(s)
- stopOnBadTerm
stop parsing on encountering a bad RDF term
- stopOnWarnings
stop parsing on encountering a warning
- checkRDFTerms
run with checking of literals and IRIs either on or off
- errorLog
the logger used for error message handling
- returns
the DataSet of triples
- STOP the whole data loading process will be stopped and a
-
def
load(env: ExecutionEnvironment, paths: Seq[URI]): DataSet[Triple]
Loads N-Quads data from a set of files or directories into a DataSet.
Loads N-Quads data from a set of files or directories into a DataSet. The path can also contain multiple paths and even wildcards, e.g.
"/my/dir1,/my/paths/part-00[0-5]*,/another/dir,/a/specific/file"- env
the Flink environment
- paths
the path to the N-Quads file(s)
- returns
the DataSet of triples
-
def
load(env: ExecutionEnvironment, path: URI): DataSet[Triple]
Loads N-Quads data from a file or directory into a DataSet.
Loads N-Quads data from a file or directory into a DataSet.
- env
the Flink environment
- path
the path to the N-Quads file(s)
- returns
the DataSet of triples
- def main(args: Array[String]): Unit
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()