com.franz.ag
Class NTriplesSerializer
java.lang.Object
com.franz.ag.AllegroGraphSerializer
com.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.
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NTriplesSerializer
public NTriplesSerializer()
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