Class NTriple

All Implemented Interfaces:

public class NTriple extends Object implements ARPErrorNumbers
A command line interface into ARP. Creates NTriple's or just error messages.
 java <class-path> com.hp.hpl.jena.arp.NTriple ( [ -[xstfurR]][ -b xmlBase -[eiw] NNN[,NNN...] ] [ file ] [ url ] )...

All options, files and URLs can be intemingled in any order. They are processed from left-to-right.

Converts RDF/XML file into N-triples
Converts RDF/XML from URL into N-triples
-b uri
Sets XML Base to the absolute URI.
Content is RDF (default, no embedding, rdf:RDF tag may be omitted).
RDF embedded in XML document, search for obligatory rdf:RDF start element.
No n-triple output, error checking only.
Lax mode - warnings are suppressed.
Strict mode - most warnings are errors.
Allow unqualified attributes (defaults to warning).
All errors are.error - report first one only.
Show line numbers of each triple.
-b url
Sets XML Base to the absolute url.
-e NNN[,NNN...]
Treats numbered warning conditions as errrors.
-w NNN[,NNN...]
Treats numbered error conditions as warnings.
-i NNN[,NNN...]
Ignores numbered error/warning conditions.
  • Constructor Details

    • NTriple

      public NTriple()
  • Method Details

    • main

      public static void main(String[] args)
      Starts an RDF/XML to NTriple converter.
      args - The command-line arguments.
    • mainEh

      public static void mainEh(String[] args, ErrorHandler eh, ARPEventHandler ap)
      Starts an RDF/XML to NTriple converter, using an error handler, and an ARPHandler. Statements get processed both by this class, and by the passed in StatementHandler
      args - The command-line arguments.
      eh - Can be null.
      ap - Can be null.
    • escapeNTriple

      public static String escapeNTriple(String anonymousID)
      Replace any non-legal char (or Z) with ZNN where NN are the hex codes in UTF-8
      anonymousID - Is something that corresponds to an XMLName
      an ascii string that is legal NTriple