Interface LinkPredictionFormat<U>

Type Parameters:
U - type of the users.
All Known Implementing Classes:
SimpleLinkPredictionFormat, TuplesLinkPredictionFormat

public interface LinkPredictionFormat<U>
Recommendation writers and readers with a common format.
  • Method Details

    • getWriter

      default LinkPredictionFormat.Writer<U> getWriter​(java.nio.file.Path path) throws java.io.IOException
      Gets a writer for a file path.
      Parameters:
      path - file path
      Returns:
      a link prediction writer
      Throws:
      java.io.IOException - if path does not exist or IO error
    • getWriter

      default LinkPredictionFormat.Writer<U> getWriter​(java.lang.String path) throws java.io.IOException
      Gets a writer for a file path.
      Parameters:
      path - file path
      Returns:
      a link prediction writer
      Throws:
      java.io.IOException - if path does not exist or IO error
    • getWriter

      default LinkPredictionFormat.Writer<U> getWriter​(java.io.File file) throws java.io.IOException
      Gets a writer for a file.
      Parameters:
      file - file
      Returns:
      a link prediction writer
      Throws:
      java.io.IOException - if path does not exist or IO error
    • getWriter

      LinkPredictionFormat.Writer<U> getWriter​(java.io.OutputStream out) throws java.io.IOException
      Gets a writer for an output stream.
      Parameters:
      out - output stream
      Returns:
      a link prediction writer
      Throws:
      java.io.IOException - if path does not exist or IO error
    • getReader

      default LinkPredictionFormat.Reader<U> getReader​(java.nio.file.Path path) throws java.io.IOException
      Gets a reader for a file path.
      Parameters:
      path - file path
      Returns:
      a link prediction reader
      Throws:
      java.io.IOException - when IO error
    • getReader

      default LinkPredictionFormat.Reader<U> getReader​(java.lang.String path) throws java.io.IOException
      Gets a reader for a file path.
      Parameters:
      path - file path
      Returns:
      a link prediction reader
      Throws:
      java.io.IOException - when IO error
    • getReader

      default LinkPredictionFormat.Reader<U> getReader​(java.io.File file) throws java.io.IOException
      Gets a reader for a file.
      Parameters:
      file - file
      Returns:
      a link prediction reader
      Throws:
      java.io.IOException - when IO error
    • getReader

      LinkPredictionFormat.Reader<U> getReader​(java.io.InputStream in) throws java.io.IOException
      Gets a reader for an input stream.
      Parameters:
      in - input stream
      Returns:
      a recommendation reader
      Throws:
      java.io.IOException - when IO error