Class TripleSet

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      TripleSet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean contains​(RdfTriple triple)
      Checks if the RDF graph contains the specified triple.
      boolean remove​(RdfTriple triple)
      Removes a triple from the RDF graph.
      java.util.stream.Stream<RdfTriple> stream()
      Returns a stream of all the triples in the RDF graph.
      • Methods inherited from class java.util.HashSet

        add, clear, clone, contains, isEmpty, iterator, remove, size, spliterator
      • Methods inherited from class java.util.AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class java.util.AbstractCollection

        addAll, containsAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface com.apicatalog.rdf.model.RdfGraph

        add
      • Methods inherited from interface java.util.Set

        addAll, containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray
    • Constructor Detail

      • TripleSet

        public TripleSet()
    • Method Detail

      • stream

        public java.util.stream.Stream<RdfTriple> stream()
        Description copied from interface: RdfGraph
        Returns a stream of all the triples in the RDF graph.

        This method provides a convenient way to iterate over all the triples in the graph. It can be used with Java Streams API to process the triples in a functional manner.

        Specified by:
        stream in interface java.util.Collection<RdfTriple>
        Specified by:
        stream in interface RdfGraph
        Returns:
        a Stream of RdfTriples representing the RDF graph
      • contains

        public boolean contains​(RdfTriple triple)
        Description copied from interface: RdfGraph
        Checks if the RDF graph contains the specified triple.

        This method allows you to verify whether a specific RDF triple is present in the graph.

        Specified by:
        contains in interface RdfGraph
        Parameters:
        triple - the RdfTriple to check for
        Returns:
        true if the graph contains the specified triple; false otherwise
      • remove

        public boolean remove​(RdfTriple triple)
        Description copied from interface: RdfGraph
        Removes a triple from the RDF graph.

        This operation is unsupported by default and will throw an UnsupportedOperationException. Implementations that support removal of triples should override this method.

        Specified by:
        remove in interface RdfGraph
        Parameters:
        triple - the RdfTriple to remove
        Returns:
        true if the triple was successfully removed (implementation dependent)