public class TTLSerializer extends Object implements ISerializer
| Constructor and Description |
|---|
TTLSerializer()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addStatement(String subject,
String predicate,
String object,
double similarity)
Adds a statement to the list of statements to be printed
|
boolean |
close()
Closes the output file
|
void |
flush() |
File |
getFile(String fileName)
Method to open the file with the specific name
|
String |
getFileExtension() |
String |
getName() |
boolean |
open(String file)
Opens the output file
|
void |
printPrefixes()
Print prefixes
|
void |
printStatement(String subject,
String predicate,
String object,
double similarity)
Prints a triple in a file.
|
void |
setFolderPath(File f)
Method to set the folder where Serializations should be saved to.
|
void |
setPrefixes(Map<String,String> prefixes)
Sets the prefixes to be used in the file.
|
void |
writeToFile(AMapping mapping,
String predicate,
String file)
Write the content of the mapping including the expansion of the prefixes
to a file
|
public void addStatement(String subject, String predicate, String object, double similarity)
addStatement in interface ISerializersubject - Subject of the triplepredicate - Predicate of the tripleobject - Object of the triplesimilarity - Similarity of subject and objectpublic void flush()
public void writeToFile(AMapping mapping, String predicate, String file)
writeToFile in interface ISerializermapping - Mapping to be writtenpredicate - mapping predicate used to connect subjects and objectsfile - Output filepublic void printPrefixes()
public void printStatement(String subject, String predicate, String object, double similarity)
ISerializerprintStatement in interface ISerializersubject - The subject of the triplepredicate - The predicate of the tripleobject - The object of the triplesimilarity - valuepublic boolean close()
ISerializerclose in interface ISerializerpublic boolean open(String file)
ISerializeropen in interface ISerializerfile - Path to the file in which the output is to be writtenpublic String getName()
getName in interface ISerializerpublic void setPrefixes(Map<String,String> prefixes)
ISerializersetPrefixes in interface ISerializerprefixes - List of prefixes to usepublic String getFileExtension()
getFileExtension in interface ISerializerpublic File getFile(String fileName)
ISerializergetFile in interface ISerializerfileName - stringpublic void setFolderPath(File f)
ISerializersetFolderPath in interface ISerializerf - File which points to the folder to serialize within.Copyright © 2020. All rights reserved.