Class LangNTuple<X>

All Implemented Interfaces:
Iterator<X>, LangRIOT
Direct Known Subclasses:
LangNQuads, LangNTriples

public abstract class LangNTuple<X> extends LangBase implements Iterator<X>
N-Quads, N-triples parser framework, with both push and pull interfaces.
  • The LangBase.parse() method processes the whole stream of tokens, sending each to a Sink object.
  • The Iterator<X> interface yields triples one-by-one.
Normally, bad terms causes the parser to stop (i.e. treat them as errors). In addition, the NTuples subsystem allows triples/quads with "bad" terms to be skipped. Checking can be switched off completely. If the data is known to be correct, no checking can be a large performance gain. Caveat emptor.
  • Method Details

    • hasNext

      public final boolean hasNext()
      Specified by:
      hasNext in interface Iterator<X>
    • next

      public final X next()
      Specified by:
      next in interface Iterator<X>
    • getSkipOnBadTerm

      public boolean getSkipOnBadTerm()
      SkipOnBadTerm - do not output tuples with bad RDF terms
    • setSkipOnBadTerm

      public void setSkipOnBadTerm(boolean skipOnBadTerm)
      SkipOnBadTerm - do not output tuples with bad RDF terms