Class DatasetOne

  • All Implemented Interfaces:
    Dataset, Transactional

    public class DatasetOne
    extends DatasetImpl
    A dataset that just hold a single model as the default graph. It is particularly appropriate for use with inference models.
    API Note:
    This class makes the use of DatasetImpl with one fixed model clearer. It may become useful to have a separate implementation altogether at some time.
    • Constructor Detail

      • DatasetOne

        public DatasetOne​(Model model)
    • Method Detail

      • setDefaultModel

        public Dataset setDefaultModel​(Model model)
        Description copied from interface: Dataset
        Set the default graph. Can be set to null for none.
        Specified by:
        setDefaultModel in interface Dataset
        Overrides:
        setDefaultModel in class DatasetImpl
        Parameters:
        model - the default graph to set
        Returns:
        this Dataset for continued usage
      • addNamedModel

        public Dataset addNamedModel​(java.lang.String uri,
                                     Model model)
        Description copied from interface: Dataset
        Set a named graph.
        Specified by:
        addNamedModel in interface Dataset
        Overrides:
        addNamedModel in class DatasetImpl
        Parameters:
        uri - the name of the graph to set
        model - the graph to set
        Returns:
        this Dataset for continued usage
      • removeNamedModel

        public Dataset removeNamedModel​(java.lang.String uri)
        Description copied from interface: Dataset
        Remove a named graph.
        Specified by:
        removeNamedModel in interface Dataset
        Overrides:
        removeNamedModel in class DatasetImpl
        Parameters:
        uri - the name of the gaph to remove
        Returns:
        this Dataset for continued usage
      • replaceNamedModel

        public Dataset replaceNamedModel​(java.lang.String uri,
                                         Model model)
        Description copied from interface: Dataset
        Change a named graph for another using the same name
        Specified by:
        replaceNamedModel in interface Dataset
        Overrides:
        replaceNamedModel in class DatasetImpl
        Parameters:
        uri - the name of the graph to replace
        model - the graph with which to replace it
        Returns:
        this Dataset for continued usage