Class LangNTuple<X>

  • All Implemented Interfaces:
    java.util.Iterator<X>, LangRIOT
    Direct Known Subclasses:
    LangNQuads, LangNTriples

    public abstract class LangNTuple<X>
    extends LangBase
    implements java.util.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 Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getSkipOnBadTerm()
      SkipOnBadTerm - do not output tuples with bad RDF terms
      boolean hasNext()  
      X next()  
      void setSkipOnBadTerm​(boolean skipOnBadTerm)
      SkipOnBadTerm - do not output tuples with bad RDF terms
      • Methods inherited from class org.apache.jena.riot.lang.LangBase

        parse
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Iterator

        forEachRemaining, remove
    • Method Detail

      • hasNext

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

        public final X next()
        Specified by:
        next in interface java.util.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