Interface SailDataset

    • Method Detail

      • getNamespaces

        CloseableIteration<? extends Namespace,​SailException> getNamespaces()
                                                                           throws SailException
        Gets the namespaces relevant to the data contained in this object.
        Returns:
        An iterator over the relevant namespaces, should not contain any duplicates.
        Throws:
        SailException - If this object encountered an error or unexpected situation internally.
      • getNamespace

        String getNamespace​(String prefix)
                     throws SailException
        Gets the namespace that is associated with the specified prefix, if any.
        Parameters:
        prefix - A namespace prefix, or an empty string in case of the default namespace.
        Returns:
        The namespace name that is associated with the specified prefix, or null if there is no such namespace.
        Throws:
        SailException - If this object encountered an error or unexpected situation internally.
        NullPointerException - In case prefix is null.
      • getStatements

        CloseableIteration<? extends Statement,​SailException> getStatements​(Resource subj,
                                                                                  IRI pred,
                                                                                  Value obj,
                                                                                  Resource... contexts)
                                                                           throws SailException
        Gets all statements that have a specific subject, predicate and/or object. All three parameters may be null to indicate wildcards. Optionally a (set of) context(s) may be specified in which case the result will be restricted to statements matching one or more of the specified contexts.
        Parameters:
        subj - A Resource specifying the subject, or null for a wildcard.
        pred - A IRI specifying the predicate, or null for a wildcard.
        obj - A Value specifying the object, or null for a wildcard.
        contexts - The context(s) to get the statements from. Note that this parameter is a vararg and as such is optional. If no contexts are supplied the method operates on all contexts.
        Returns:
        An iterator over the relevant statements.
        Throws:
        SailException - If the triple source failed to get the statements.
      • getTriples

        default CloseableIteration<? extends Triple,​SailException> getTriples​(Resource subj,
                                                                                    IRI pred,
                                                                                    Value obj)
                                                                             throws SailException
        Gets all RDF-star triples that have a specific subject, predicate and/or object. All three parameters may be null to indicate wildcards.
        Parameters:
        subj - A Resource specifying the subject, or null for a wildcard.
        pred - A IRI specifying the predicate, or null for a wildcard.
        obj - A Value specifying the object, or null for a wildcard.
        Returns:
        An iterator over the relevant triples.
        Throws:
        SailException - If the triple source failed to get the RDF-star triples.