Skip to content
Permalink
Browse files
Standardize on American English spelling of 'behavior'.
  • Loading branch information
garydgregory committed Mar 30, 2020
1 parent d25705e commit 177dacaf386423b0e211d1911ca75a1ca71fd0e8
Showing 10 changed files with 23 additions and 23 deletions.
@@ -16,7 +16,7 @@ incompatibility issue between these toolkits. This library does not pretend to
be a generic API wrapping those libraries, but is a
[set of common Java interfaces](https://commons.apache.org/proper/commons-rdf/apidocs/index.html?org/apache/commons/rdf/api/package-summary.html)
for the RDF 1.1 concepts, e.g. `IRI`, `BlankNode`, `Graph`,
accompanied with unit test cases for their expected behaviour, and a `simple`
accompanied with unit test cases for their expected behavior, and a `simple`
implementation, which main purpose is to clarify the tests and interfaces.

In particular, Commons RDF aims to provide a type-safe, non-general API that
@@ -93,7 +93,7 @@ public interface Dataset extends AutoCloseable, GraphLike<Quad> {
* For example, this would close any open file and network streams and free
* database locks held by the dataset implementation.
* <p>
* The behaviour of the other dataset methods are undefined after closing
* The behavior of the other dataset methods are undefined after closing
* the dataset.
* <p>
* Implementations might not need {@link #close()}, hence the default
@@ -215,7 +215,7 @@ default void close() throws Exception {
* The iteration does not contain any duplicate quads, as determined by the
* {@link Quad#equals(Object)} method for each {@link Quad}.
* <p>
* The behaviour of the {@link Stream} is not specified if
* The behavior of the {@link Stream} is not specified if
* {@link #add(Quad)}, {@link #remove(Quad)} or {@link #clear()} are called
* on the {@link Dataset} before it terminates.
* <p>
@@ -233,7 +233,7 @@ default void close() throws Exception {
* The iteration does not contain any duplicate quads, as determined by the
* {@link Quad#equals(Object)} method for each {@link Quad}.
* <p>
* The behaviour of the {@link Stream} is not specified if
* The behavior of the {@link Stream} is not specified if
* {@link #add(Quad)}, {@link #remove(Quad)} or {@link #clear()} are called
* on the {@link Dataset} before it terminates.
* <p>
@@ -266,7 +266,7 @@ Stream<? extends Quad> stream(Optional<BlankNodeOrIRI> graphName, BlankNodeOrIRI
* }
* </pre>
*
* The behaviour of the iterator is not specified if {@link #add(Quad)},
* The behavior of the iterator is not specified if {@link #add(Quad)},
* {@link #remove(Quad)} or {@link #clear()}, are called on the
* {@link Dataset} before it terminates. It is undefined if the returned
* {@link Iterator} supports the {@link Iterator#remove()} method.
@@ -311,7 +311,7 @@ default Iterable<Quad> iterate() throws ConcurrentModificationException, Illegal
* }
* </pre>
* <p>
* The behaviour of the iterator is not specified if {@link #add(Quad)},
* The behavior of the iterator is not specified if {@link #add(Quad)},
* {@link #remove(Quad)} or {@link #clear()}, are called on the
* {@link Dataset} before it terminates. It is undefined if the returned
* {@link Iterator} supports the {@link Iterator#remove()} method.
@@ -84,7 +84,7 @@ public interface Graph extends AutoCloseable, GraphLike<Triple> {
* For example, this would close any open file and network streams and free
* database locks held by the Graph implementation.
* <p>
* The behaviour of the other Graph methods are undefined after closing the
* The behavior of the other Graph methods are undefined after closing the
* graph.
* <p>
* Implementations might not need {@link #close()}, hence the default
@@ -138,7 +138,7 @@ default void close() throws Exception {
* The iteration does not contain any duplicate triples, as determined by
* the {@link Triple#equals(Object)} method for each {@link Triple}.
* <p>
* The behaviour of the {@link Stream} is not specified if
* 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>
@@ -157,7 +157,7 @@ default void close() throws Exception {
* The iteration does not contain any duplicate triples, as determined by
* the {@link Triple#equals(Object)} method for each {@link Triple}.
* <p>
* The behaviour of the {@link Stream} is not specified if
* 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>
@@ -215,7 +215,7 @@ default Stream<? extends Triple> getTriples(final BlankNodeOrIRI subject, final
* }
* </pre>
*
* The behaviour of the iterator is not specified if {@link #add(Triple)},
* 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.
@@ -259,7 +259,7 @@ default Iterable<Triple> iterate() throws ConcurrentModificationException, Illeg
* }
* </pre>
* <p>
* The behaviour of the iterator is not specified if {@link #add(Triple)},
* 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.
@@ -32,7 +32,7 @@
* {@link RDFTerm} instances from different implementations.
* <p>
* As {@link TripleLike} do not have a specific {@link Object#equals(Object)}
* semantics, the behaviour of methods like {@link #contains(TripleLike)} and
* semantics, the behavior of methods like {@link #contains(TripleLike)} and
* {@link #remove(TripleLike)} is undefined for arguments that are not object
* identical to previously added or returned {@link TripleLike} statements.
*
@@ -30,10 +30,10 @@
* <p>
* A <code>Quad</code> object in Commons RDF is considered
* <strong>immutable</strong>, that is, over its life time it will have
* consistent behaviour for its {@link #equals(Object)}, and the instances
* consistent behavior for its {@link #equals(Object)}, and the instances
* returned from {@link #getGraphName()}, {@link #getSubject()},
* {@link #getPredicate()}, {@link #getObject()} and {@link #asTriple()} will
* have consistent {@link Object#equals(Object)} behaviour.
* have consistent {@link Object#equals(Object)} behavior.
* <p>
* Note that <code>Quad</code> methods are not required to return object
* identical (<code>==</code>) instances as long as they are equivalent
@@ -140,7 +140,7 @@ public interface RDFSyntax {
* protocol</a>.
* <p>
* The returned Set MUST include the value {@link #mediaType()}; this is the
* behaviour of the default implementation.
* behavior of the default implementation.
*
* @return The media types corresponding to the RDF Syntax
*/
@@ -164,7 +164,7 @@ default Set<String> mediaTypes() {
* The file extension includes the leading period, e.g. <code>.jsonld</code>
* <p>
* The returned Set MUST include the value from {@link #fileExtension()}; this is
* the behaviour of the default implementation.
* the behavior of the default implementation.
*
* @return The file extensions corresponding to the RDF Syntax
*/
@@ -25,10 +25,10 @@
* <p>
* A {@link RDFTerm} object in Commons RDF is considered
* <strong>immutable</strong>, that is, over its life time it will have
* consistent behaviour for its {@link #equals(Object)} and {@link #hashCode()},
* consistent behavior for its {@link #equals(Object)} and {@link #hashCode()},
* and objects returned from its getter methods (e.g. {@link IRI#getIRIString()}
* and {@link Literal#getLanguageTag()}) will have consistent
* {@link #equals(Object)} behaviour.
* {@link #equals(Object)} behavior.
* <p>
* Note that methods in <code>RDFTerm</code> and its Commons RDF specialisations
* {@link IRI}, {@link BlankNode} and {@link Literal} are not required to return
@@ -27,10 +27,10 @@
* <p>
* A <code>Triple</code> object in Commons RDF is considered
* <strong>immutable</strong>, that is, over its life time it will have
* consistent behaviour for its {@link #equals(Object)}, and the {@link RDFTerm}
* consistent behavior for its {@link #equals(Object)}, and the {@link RDFTerm}
* instances returned from {@link #getSubject()}, {@link #getPredicate()} and
* {@link #getObject()} will have consistent {@link RDFTerm#equals(Object)}
* behaviour.
* behavior.
* <p>
* Note that <code>Triple</code> methods are not required to return object
* identical (<code>==</code>) instances as long as they are equivalent
@@ -209,7 +209,7 @@ System.out.println(aliceKnowsBob.getObject().ntriplesString());
_**Tip**: Instances from `SimpleRDF` can be printed directly, as
`System.out` would use their `.toString()`,
but for consistent behaviour across implementations we use `.ntriplesString()` above._
but for consistent behavior across implementations we use `.ntriplesString()` above._

With `SimpleRDF` we can also print the `Triple` for debugging:

@@ -621,7 +621,7 @@ and does not need to be preserved.

Note that it needs to be the same `RDF` instance to recreate
the same _"someone"_ `BlankNode`. This is a Commons RDF-specific
behaviour to improve cross-graph compatibility, other RDF frameworks may save
behavior to improve cross-graph compatibility, other RDF frameworks may save
the blank node using the provided label as-is with a `_:` prefix,
which in some cases could cause collisions (but perhaps more readable output).

@@ -1174,7 +1174,7 @@ methods like [iterate](apidocs/org/apache/commons/rdf/api/Graph.html#iterate--)
and [stream](apidocs/org/apache/commons/rdf/api/Graph.html#stream-org.apache.commons.rdf.api.BlankNodeOrIRI-org.apache.commons.rdf.api.IRI-org.apache.commons.rdf.api.RDFTerm-)
might throw a
[ConcurrentModificationException](http://docs.oracle.com/javase/8/docs/api/java/util/ConcurrentModificationException.html)
if it detects a thread concurrency modification, although this behaviour is not guaranteed.
if it detects a thread concurrency modification, although this behavior is not guaranteed.
Implementations of Commons RDF may specify more specific thread-safety considerations.

If an implementation does not specify any thread-safety support, then all

0 comments on commit 177daca

Please sign in to comment.