Interface ISerializer

    • Method Detail

      • writeToFile

        void writeToFile​(AMapping m,
                         String predicate,
                         String file)
        Writes the whole results of a mapping to a file
        Parameters:
        m - Mapping computed by an organizer
        predicate - of the mapping
        file - Output file, where the results are to be written
      • setPrefixes

        void setPrefixes​(Map<String,​String> prefixes)
        Sets the prefixes to be used in the file.
        Parameters:
        prefixes - List of prefixes to use
      • printStatement

        void printStatement​(String subject,
                            String predicate,
                            String object,
                            double confidence)
        Prints a triple in a file. Requires the method open to have been carried out
        Parameters:
        subject - The subject of the triple
        predicate - The predicate of the triple
        object - The object of the triple
        confidence - value
      • addStatement

        void addStatement​(String subject,
                          String predicate,
                          String object,
                          double confidence)
        Adds a triple to the buffer of the serializer. Requires the method open to have been carried out
        Parameters:
        subject - The subject of the triple
        predicate - The predicate of the triple
        object - The object of the triple
        confidence - value
      • close

        boolean close()
        Closes the output file
        Returns:
        true if the file was closed successfully, else false
      • open

        boolean open​(String file)
        Opens the output file
        Parameters:
        file - Path to the file in which the output is to be written
        Returns:
        true if opening was carried out successfully, else false.
      • getName

        String getName()
        Returns:
        name
      • getFileExtension

        String getFileExtension()
        Returns:
        file extension
      • getFile

        File getFile​(String fileName)
        Method to open the file with the specific name
        Parameters:
        fileName - string
        Returns:
        file instance
      • setFolderPath

        void setFolderPath​(File folder)
        Method to set the folder where Serializations should be saved to.
        Parameters:
        folder - File which points to the folder to serialize within.