Skip to content
Permalink
Browse files
Fix build by fixing Javadoc on Java 17.
Javadoc TODOs placeholder left behind.
  • Loading branch information
garydgregory committed Mar 27, 2022
1 parent 9a9e94b commit 9aa5d2254948a9c0167d00985fc1c07b79b3d867
Showing 7 changed files with 139 additions and 45 deletions.
@@ -83,12 +83,15 @@ public interface Graph extends AutoCloseable, GraphLike<Triple> {
* <p>
* For example, this would close any open file and network streams and free
* database locks held by the Graph implementation.
* </p>
* <p>
* The behavior of the other Graph methods are undefined after closing the
* graph.
* </p>
* <p>
* Implementations might not need {@link #close()}, hence the default
* implementation does nothing.
* </p>
*/
@Override
default void close() throws Exception {
@@ -126,6 +129,7 @@ default void close() throws Exception {
* <p>
* The count of a set does not include duplicates, consistent with the
* {@link Triple#equals(Object)} equals method for each {@link Triple}.
* </p>
*
* @return The number of triples in the graph
*/
@@ -137,13 +141,16 @@ default void close() throws Exception {
* <p>
* The iteration does not contain any duplicate triples, as determined by
* the {@link Triple#equals(Object)} method for each {@link Triple}.
* </p>
* <p>
* The behavior of the {@link Stream} is not specified if
* {@link #add(Triple)}, {@link #remove(Triple)} or {@link #clear()} are
* called on the {@link Graph} before it terminates.
* </p>
* <p>
* Implementations may throw {@link ConcurrentModificationException} from
* Stream methods if they detect a conflict while the Stream is active.
* </p>
*
* @since 0.3.0-incubating
* @return A {@link Stream} over all of the triples in the graph
@@ -156,14 +163,16 @@ default void close() throws Exception {
* <p>
* The iteration does not contain any duplicate triples, as determined by
* the {@link Triple#equals(Object)} method for each {@link Triple}.
* </p>
* <p>
* The behavior of the {@link Stream} is not specified if
* {@link #add(Triple)}, {@link #remove(Triple)} or {@link #clear()} are
* called on the {@link Graph} before it terminates.
* </p>
* <p>
* Implementations may throw {@link ConcurrentModificationException} from
* Stream methods if they detect a conflict while the Stream is active.
* <p>
* </p>
*
* @since 0.3.0-incubating
* @param subject
@@ -217,17 +226,19 @@ default boolean isEmpty() {
* Gets an Iterable for iterating over all triples in the graph.
* <p>
* This method is meant to be used with a Java for-each loop, e.g.:
*
* </p>
* <pre>
* for (Triple t : graph.iterate()) {
* System.out.println(t);
* }
* </pre>
*
* <p>
* The behavior of the iterator is not specified if {@link #add(Triple)},
* {@link #remove(Triple)} or {@link #clear()}, are called on the
* {@link Graph} before it terminates. It is undefined if the returned
* {@link Iterator} supports the {@link Iterator#remove()} method.
* </p>
* <p>
* Implementations may throw {@link ConcurrentModificationException} from
* Iterator methods if they detect a concurrency conflict while the Iterator
@@ -236,9 +247,11 @@ default boolean isEmpty() {
* The {@link Iterable#iterator()} must only be called once, that is the
* Iterable must only be iterated over once. A {@link IllegalStateException}
* may be thrown on attempt to reuse the Iterable.
* </p>
* <p>
* The default implementation of this method will call {@link #stream()} to return
* its {@link Stream#iterator()}.
* </p>
*
* @return A {@link Iterable} that returns {@link Iterator} over all of the
* triples in the graph
@@ -259,7 +272,7 @@ default Iterable<Triple> iterate() throws ConcurrentModificationException, Illeg
* the pattern.
* <p>
* This method is meant to be used with a Java for-each loop, e.g.:
*
* </p>
* <pre>
* IRI alice = factory.createIRI("http://example.com/alice");
* IRI knows = factory.createIRI("http://xmlns.com/foaf/0.1/");
@@ -272,18 +285,22 @@ default Iterable<Triple> iterate() throws ConcurrentModificationException, Illeg
* {@link #remove(Triple)} or {@link #clear()}, are called on the
* {@link Graph} before it terminates. It is undefined if the returned
* {@link Iterator} supports the {@link Iterator#remove()} method.
* </p>
* <p>
* Implementations may throw {@link ConcurrentModificationException} from
* Iterator methods if they detect a concurrency conflict while the Iterator
* is active.
* </p>
* <p>
* The {@link Iterable#iterator()} must only be called once, that is the
* Iterable must only be iterated over once. A {@link IllegalStateException}
* may be thrown on attempt to reuse the Iterable.
* </p>
* <p>
* The default implementation of this method will call
* {@link #stream(BlankNodeOrIRI, IRI, RDFTerm)} to return its
* {@link Stream#iterator()}.
* </p>
*
* @param subject
* The triple subject (null is a wildcard)
@@ -28,36 +28,70 @@
@Deprecated
public interface RDFTermFactory {

/**
* @return By default, throws UnsupportedOperationException
*/
default BlankNode createBlankNode() throws UnsupportedOperationException {
throw new UnsupportedOperationException("createBlankNode() not supported");
}

/**
* @param name TODO
* @return By default, throws UnsupportedOperationException
*/
default BlankNode createBlankNode(final String name) throws UnsupportedOperationException {
throw new UnsupportedOperationException("createBlankNode(String) not supported");
}

/**
* @return By default, throws UnsupportedOperationException
*/
default Graph createGraph() throws UnsupportedOperationException {
throw new UnsupportedOperationException("createGraph() not supported");
}

/**
* @param iri TODO
* @return TODO
*/
default IRI createIRI(final String iri) throws IllegalArgumentException, UnsupportedOperationException {
throw new UnsupportedOperationException("createIRI(String) not supported");
}

/**
* @param lexicalForm TODO
* @return TODO
*/
default Literal createLiteral(final String lexicalForm) throws IllegalArgumentException, UnsupportedOperationException {
throw new UnsupportedOperationException("createLiteral(String) not supported");
}

/**
* @param lexicalForm TODO
* @param dataType TODO
* @return TODO
*/
default Literal createLiteral(final String lexicalForm, final IRI dataType)
throws IllegalArgumentException, UnsupportedOperationException {
throw new UnsupportedOperationException("createLiteral(String) not supported");
}

/**
* @param lexicalForm TODO
* @param languageTag TODO
* @return TODO
*/
default Literal createLiteral(final String lexicalForm, final String languageTag)
throws IllegalArgumentException, UnsupportedOperationException {
throw new UnsupportedOperationException("createLiteral(String,String) not supported");
}

/**
* @param subject TODO
* @param predicate TODO
* @param object TODO
* @return TODO
*/
default Triple createTriple(final BlankNodeOrIRI subject, final IRI predicate, final RDFTerm object)
throws IllegalArgumentException, UnsupportedOperationException {
throw new UnsupportedOperationException("createTriple(BlankNodeOrIRI,IRI,RDFTerm) not supported");
@@ -56,12 +56,21 @@ public class DatasetGraphView implements Graph {
private final BlankNodeOrIRI namedGraph;
private final Dataset dataset;

/**
* Constructs a new instance.
* @param dataset TODO
*/
public DatasetGraphView(final Dataset dataset) {
this.dataset = dataset;
this.namedGraph = null;
this.unionGraph = true;
}

/**
* Constructs a new instance.
* @param dataset TODO
* @param namedGraph TODO
*/
public DatasetGraphView(final Dataset dataset, final BlankNodeOrIRI namedGraph) {
this.dataset = dataset;
this.namedGraph = namedGraph;

0 comments on commit 9aa5d22

Please sign in to comment.