Class AbstractJsonLdGraphLike<T extends TripleLike>

    • Field Detail

      • SALT

        private static java.util.UUID SALT
        Used by #bnodePrefix() to get a unique UUID per JVM run
      • bnodePrefix

        final java.lang.String bnodePrefix
        Prefix to use in blank node identifiers
      • rdfDataSet

        com.github.jsonldjava.core.RDFDataset rdfDataSet
        The underlying JSON-LD RDFDataset.

        Note: This is NOT final as it is reset to null by close() (to free memory).

    • Constructor Detail

      • AbstractJsonLdGraphLike

        AbstractJsonLdGraphLike​(com.github.jsonldjava.core.RDFDataset rdfDataSet)
      • AbstractJsonLdGraphLike

        AbstractJsonLdGraphLike​(com.github.jsonldjava.core.RDFDataset rdfDataSet,
                                java.lang.String bnodePrefix)
      • AbstractJsonLdGraphLike

        AbstractJsonLdGraphLike​(java.lang.String bnodePrefix)
    • Method Detail

      • add

        public void add​(T t)
        Description copied from interface: GraphLike
        Add a statement.
        Specified by:
        add in interface GraphLike<T extends TripleLike>
        Parameters:
        t - The TripleLike statement to add
      • close

        public void close()
      • contains

        public boolean contains​(T tripleOrQuad)
        Description copied from interface: GraphLike
        Check if statement is contained.
        Specified by:
        contains in interface GraphLike<T extends TripleLike>
        Parameters:
        tripleOrQuad - The TripleLike statement to check
        Returns:
        True if the statement is contained
      • getRdfDataSet

        public com.github.jsonldjava.core.RDFDataset getRdfDataSet()
        Description copied from interface: JsonLdGraphLike
        Return the underlying JSONLD-Java RDFDataset.

        Changes in the JSONLD-Java dataset is reflected in this class and vice versa.

        Specified by:
        getRdfDataSet in interface JsonLdGraphLike<T extends TripleLike>
        Returns:
        The underlying JSONLD-JAva RDFDataset
      • stream

        public java.util.stream.Stream<? extends T> stream()
        Description copied from interface: GraphLike
        Return a Stream of contained statements.
        Specified by:
        stream in interface GraphLike<T extends TripleLike>
        Returns:
        A Stream of TripleLike statements.
      • filteredGraphs

        java.util.stream.Stream<java.util.List<com.github.jsonldjava.core.RDFDataset.Quad>> filteredGraphs​(java.util.Optional<BlankNodeOrIRI> graphName)
      • graphNameAsJsonLdString

        java.lang.String graphNameAsJsonLdString​(T tripleOrQuad)
      • quadFilter

        java.util.function.Predicate<com.github.jsonldjava.core.RDFDataset.Quad> quadFilter​(BlankNodeOrIRI subject,
                                                                                            IRI predicate,
                                                                                            RDFTerm object)