com.franz.ag
Class NTriplesSerializer

java.lang.Object
  extended bycom.franz.ag.AllegroGraphSerializer
      extended bycom.franz.ag.NTriplesSerializer

public class NTriplesSerializer
extends com.franz.ag.AllegroGraphSerializer

The N-Triples serializer is described in more detail in the AllegroGraph Reference Guide for Lisp users as the print-triples function.


Constructor Summary
NTriplesSerializer()
           
 
Method Summary
 java.lang.String getDestination()
           
 java.lang.String getFormat()
           
 java.lang.Object getIfDoesNotExist()
           
 java.lang.Object getIfExists()
           
 java.lang.Object getResult()
           
 java.lang.Object getSource()
           
 java.lang.Object run(AllegroGraph source)
          Serialize all the triples in a triple store.
 java.lang.Object run(Cursor source)
          Serialize all the triples collected by a cursor.
 void setDestination(java.lang.String destination)
           
 void setFormat(java.lang.String format)
           
 void setIfDoesNotExist(java.lang.String ifDoesNotExist)
           
 void setIfExists(java.lang.String ifExists)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NTriplesSerializer

public NTriplesSerializer()
Method Detail

getIfDoesNotExist

public java.lang.Object getIfDoesNotExist()
Returns:
the ifDoesNotExist

setIfDoesNotExist

public void setIfDoesNotExist(java.lang.String ifDoesNotExist)
Parameters:
ifDoesNotExist - the ifDoesNotExist to set. The allowed values are "create" or "error". The default is "create".

getIfExists

public java.lang.Object getIfExists()
Returns:
the ifExists

setIfExists

public void setIfExists(java.lang.String ifExists)
Parameters:
ifExists - the ifExists to set. The valid values are "error", "supersede", or "append. The default is "error".

getFormat

public java.lang.String getFormat()
Returns:
the format

setFormat

public void setFormat(java.lang.String format)
Parameters:
format - the format to set. The valid values are "ntriples", "long", or "concise". The default is "ntriples".

run

public java.lang.Object run(AllegroGraph source)
                     throws AllegroGraphException
Serialize all the triples in a triple store.

Parameters:
source - The AllegroGraph instance to be serialized.
Returns:
The string containing the serialization if destination is null, or null if the destination is a file.
Throws:
AllegroGraphException

run

public java.lang.Object run(Cursor source)
                     throws AllegroGraphException
Serialize all the triples collected by a cursor.

Parameters:
source - The Cursor instance to be serialized.
Returns:
The string containing the serialization if destination is null, or null if the destination is a file.
Throws:
AllegroGraphException

getDestination

public java.lang.String getDestination()
Returns:
the destination

setDestination

public void setDestination(java.lang.String destination)
Parameters:
destination - Null to serialize to a string, or a string containing the pathname of the destination file or folder.

getResult

public java.lang.Object getResult()
Returns:
the result

getSource

public java.lang.Object getSource()
Returns:
the source