Class InputSourceFactory

java.lang.Object
tech.oxfordsemantic.jrdfox.client.InputSourceFactory

public class InputSourceFactory
extends java.lang.Object
Encapsulates information about a source that can be imported into RDFox. Concrete instances of this class can be created using static methods.
  • Method Summary

    Modifier and Type Method Description
    java.lang.Object getContent()
    Returns the content of this input source.
    java.lang.String getName()
    Returns the name of this input source.
    static InputSourceFactory newInputSourceFactory​(java.io.File file)
    Creates an input source that provides data to RDFox by reading the specified file.
    static InputSourceFactory newInputSourceFactory​(java.lang.String name, java.io.InputStream content)
    Creates an input source that provides data to RDFox by reading the specified input stream.
    static InputSourceFactory newInputSourceFactory​(java.lang.String name, java.lang.String content)
    Creates an input source that provides data to RDFox by reading the specified string.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getName

      public java.lang.String getName()
      Returns the name of this input source. This name is used by RDFox to identify the input source in places such as error messages. For example, if there is an error in the input, the name of the input source will be included into the error message.
      Returns:
      the name of this input source
    • getContent

      public java.lang.Object getContent()
      Returns the content of this input source.
      Returns:
      the content of this input source
    • newInputSourceFactory

      public static InputSourceFactory newInputSourceFactory​(java.io.File file)
      Creates an input source that provides data to RDFox by reading the specified file. The name of the input source is taken to be the file name.
      Parameters:
      file - provides the location of the data
      Returns:
      the input source that provides access to the specified file
    • newInputSourceFactory

      public static InputSourceFactory newInputSourceFactory​(java.lang.String name, java.lang.String content)
      Creates an input source that provides data to RDFox by reading the specified string.
      Parameters:
      name - the name of the input source
      content - provides the content to the imported
      Returns:
      the input source that provides access to the specified string
    • newInputSourceFactory

      public static InputSourceFactory newInputSourceFactory​(java.lang.String name, java.io.InputStream content)
      Creates an input source that provides data to RDFox by reading the specified input stream.
      Parameters:
      name - the name of the input source
      content - provides the content to the imported
      Returns:
      the input source that provides access to the specified input stream