Skip to content

Commit

Permalink
eclipse-rdf4j#405 Change 'as' to 'to', Change version 3.0 to 3.3.0, R…
Browse files Browse the repository at this point in the history
…un mvn impsort:sort

Signed-off-by: Prince Sachdeva <prince17080@iiitd.ac.in>
  • Loading branch information
prince17080 committed May 24, 2020
1 parent 079ef62 commit d1d3546
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@

package org.eclipse.rdf4j.model.util;

import java.util.*;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.regex.Pattern;

import org.eclipse.rdf4j.OpenRDFUtil;
import org.eclipse.rdf4j.RDF4JException;
import org.eclipse.rdf4j.model.*;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
import org.eclipse.rdf4j.model.vocabulary.RDF;
import org.eclipse.rdf4j.model.vocabulary.RDFS;

import java.util.*;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.regex.Pattern;

/**
* Utilities for working with RDF Containers and converting to/from Java {@link Collection} classes.
* <P>
Expand Down Expand Up @@ -80,7 +80,7 @@ public class RDFContainers {
* @see <a href="https://www.w3.org/TR/rdf-schema/#ch_container">RDF Schema 1.1 section on Collection
* vocabulary</a>.
*/
public static <C extends Collection<Statement>> C asRDF(IRI containerType, Iterable<?> values, Resource container,
public static <C extends Collection<Statement>> C toRDF(IRI containerType, Iterable<?> values, Resource container,
C sink,
Resource... contexts) {

Expand Down Expand Up @@ -116,7 +116,7 @@ public static <C extends Collection<Statement>> C asRDF(IRI containerType, Itera
* @see <a href="https://www.w3.org/TR/rdf-schema/#ch_container">RDF Schema 1.1 section on Collection
* vocabulary</a>.
*/
public static <C extends Collection<Statement>> C asRDF(IRI containerType, Iterable<?> values, Resource container,
public static <C extends Collection<Statement>> C toRDF(IRI containerType, Iterable<?> values, Resource container,
C sink,
ValueFactory vf, Resource... contexts) {

Expand Down Expand Up @@ -144,7 +144,7 @@ public static <C extends Collection<Statement>> C asRDF(IRI containerType, Itera
* @see <a href="https://www.w3.org/TR/rdf-schema/#ch_container">RDF Schema 1.1 section on Collection
* vocabulary</a>.
*/
public static <C extends Collection<Value>> C asValues(IRI containerType, final Model m, Resource container,
public static <C extends Collection<Value>> C toValues(IRI containerType, final Model m, Resource container,
C collection,
Resource... contexts) throws ModelException {
Objects.requireNonNull(collection, "collection may not be null");
Expand Down Expand Up @@ -209,7 +209,7 @@ public static void consumeContainer(IRI containerType, Iterable<?> values, Resou
* vocabulary</a>.
* @see Literals#createLiteralOrFail(ValueFactory, Object)
*
* @since 3.0
* @since 3.3.0
*/
public static void consumeContainer(IRI containerType, Iterable<?> values, Resource container,
Consumer<Statement> consumer,
Expand All @@ -224,7 +224,7 @@ public static void consumeContainer(IRI containerType, Iterable<?> values, Resou
Objects.equals(containerType, RDF.SEQ);

if (!validType) {
throw new RuntimeException("containerType should be one of ALT, BAG or SEQ");
throw new ModelException("containerType should be one of ALT, BAG or SEQ");
}

Statements.consume(vf, current, RDF.TYPE, containerType, consumer, contexts);
Expand Down

0 comments on commit d1d3546

Please sign in to comment.