Rya-405 Refactor RyaURI to RyaIRI to match RDF4J. Closes #291
diff --git a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/AfterTemporalInstant.java b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/AfterTemporalInstant.java
index fe58e37..1ec0128 100644
--- a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/AfterTemporalInstant.java
+++ b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/AfterTemporalInstant.java
@@ -32,7 +32,7 @@
public class AfterTemporalInstant extends TemporalInstantRelationFunction {
@Override
public String getURI() {
- return TemporalURIs.AFTER;
+ return TemporalIRIs.AFTER;
}
@Override
diff --git a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/BeforeTemporalInstant.java b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/BeforeTemporalInstant.java
index 4cb12e0..1399723 100644
--- a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/BeforeTemporalInstant.java
+++ b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/BeforeTemporalInstant.java
@@ -32,7 +32,7 @@
public class BeforeTemporalInstant extends TemporalInstantRelationFunction {
@Override
public String getURI() {
- return TemporalURIs.BEFORE;
+ return TemporalIRIs.BEFORE;
}
@Override
diff --git a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/EqualsTemporalInstant.java b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/EqualsTemporalInstant.java
index 10fe40b..ce52436 100644
--- a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/EqualsTemporalInstant.java
+++ b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/EqualsTemporalInstant.java
@@ -32,7 +32,7 @@
public class EqualsTemporalInstant extends TemporalInstantRelationFunction {
@Override
public String getURI() {
- return TemporalURIs.EQUALS;
+ return TemporalIRIs.EQUALS;
}
@Override
diff --git a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/TemporalURIs.java b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/TemporalIRIs.java
similarity index 98%
rename from common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/TemporalURIs.java
rename to common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/TemporalIRIs.java
index 3fd016a..89f9c93 100644
--- a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/TemporalURIs.java
+++ b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/TemporalIRIs.java
@@ -22,7 +22,7 @@
/**
* Constants for the Temporal Functions used in rya.
*/
-public class TemporalURIs {
+public class TemporalIRIs {
/**
* All temporal functions have the namespace (<tt>http://rya.apache.org/ns/temporal#</tt>).
*/
diff --git a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/WithinTemporalInterval.java b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/WithinTemporalInterval.java
index 5fc3e03..dcb8c94 100644
--- a/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/WithinTemporalInterval.java
+++ b/common/rya.api.function/src/main/java/org/apache/rya/api/function/temporal/WithinTemporalInterval.java
@@ -33,7 +33,7 @@
public class WithinTemporalInterval extends TemporalIntervalRelationFunction {
@Override
public String getURI() {
- return TemporalURIs.WITHIN;
+ return TemporalIRIs.WITHIN;
}
@Override
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConfiguration.java b/common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConfiguration.java
index c5d3e5f..4a10506 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConfiguration.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConfiguration.java
@@ -23,7 +23,7 @@
import java.util.Set;
import org.apache.hadoop.conf.Configuration;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.layout.TableLayoutStrategy;
import org.apache.rya.api.layout.TablePrefixLayoutStrategy;
import org.apache.rya.api.persist.RdfEvalStatsDAO;
@@ -657,11 +657,11 @@
return getBoolean(CONF_USE_STATEMENT_METADATA, false);
}
- public void setStatementMetadataProperties(final Set<RyaURI> metadataProperties) {
+ public void setStatementMetadataProperties(final Set<RyaIRI> metadataProperties) {
final String[] propArray = new String[metadataProperties.size()];
int i = 0;
- for(final RyaURI uri: metadataProperties) {
+ for(final RyaIRI uri: metadataProperties) {
propArray[i] = uri.getData();
i++;
}
@@ -669,12 +669,12 @@
}
- public Set<RyaURI> getStatementMetadataProperties() {
- final Set<RyaURI> uriSet = new HashSet<>();
+ public Set<RyaIRI> getStatementMetadataProperties() {
+ final Set<RyaIRI> uriSet = new HashSet<>();
final String[] uriStrings = getStrings(CONF_STATEMENT_METADATA_PROPERTIES);
if (uriStrings != null) {
for (final String s : uriStrings) {
- uriSet.add(new RyaURI(s));
+ uriSet.add(new RyaIRI(s));
}
}
return uriSet;
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConstants.java b/common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConstants.java
index a0ac20d..a61137d 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConstants.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/RdfCloudTripleStoreConstants.java
@@ -23,7 +23,7 @@
import org.apache.hadoop.io.Text;
import org.apache.rya.api.domain.RyaSchema;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Literal;
import org.eclipse.rdf4j.model.Value;
@@ -141,9 +141,9 @@
//TODO: This should be in a version file somewhere
public static IRI RTS_SUBJECT = VALUE_FACTORY.createIRI(NAMESPACE, "rts");
- public static RyaURI RTS_SUBJECT_RYA = new RyaURI(RTS_SUBJECT.stringValue());
+ public static RyaIRI RTS_SUBJECT_RYA = new RyaIRI(RTS_SUBJECT.stringValue());
public static IRI RTS_VERSION_PREDICATE = VALUE_FACTORY.createIRI(NAMESPACE, "version");
- public static RyaURI RTS_VERSION_PREDICATE_RYA = new RyaURI(RTS_VERSION_PREDICATE.stringValue());
+ public static RyaIRI RTS_VERSION_PREDICATE_RYA = new RyaIRI(RTS_VERSION_PREDICATE.stringValue());
public static final Value VERSION = VALUE_FACTORY.createLiteral("3.0.0");
public static RyaType VERSION_RYA = new RyaType(VERSION.stringValue());
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/domain/RangeURI.java b/common/rya.api/src/main/java/org/apache/rya/api/domain/RangeIRI.java
similarity index 90%
rename from common/rya.api/src/main/java/org/apache/rya/api/domain/RangeURI.java
rename to common/rya.api/src/main/java/org/apache/rya/api/domain/RangeIRI.java
index d47ab5a..84b38d1 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/domain/RangeURI.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/domain/RangeIRI.java
@@ -29,13 +29,13 @@
* Time: 1:03 PM
* To change this template use File | Settings | File Templates.
*/
-public class RangeURI extends RangeValue<IRI> implements IRI {
+public class RangeIRI extends RangeValue<IRI> implements IRI {
- public RangeURI(IRI start, IRI end) {
+ public RangeIRI(IRI start, IRI end) {
super(start, end);
}
- public RangeURI(RangeValue rangeValue) {
+ public RangeIRI(RangeValue rangeValue) {
super((IRI) rangeValue.getStart(), (IRI) rangeValue.getEnd());
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURI.java b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRI.java
similarity index 84%
rename from common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURI.java
rename to common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRI.java
index 1e948ae..8909b05 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURI.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRI.java
@@ -28,21 +28,21 @@
* Date: 7/16/12
* Time: 11:56 AM
*/
-public class RyaURI extends RyaType {
+public class RyaIRI extends RyaType {
- public RyaURI() {
+ public RyaIRI() {
setDataType(XMLSchema.ANYURI);
}
- public RyaURI(String data) {
+ public RyaIRI(String data) {
super(XMLSchema.ANYURI, data);
}
- public RyaURI(String namespace, String data) {
+ public RyaIRI(String namespace, String data) {
super(XMLSchema.ANYURI, namespace + data);
}
- protected RyaURI(IRI datatype, String data) {
+ protected RyaIRI(IRI datatype, String data) {
super(datatype, data);
}
@@ -54,7 +54,7 @@
protected void validate(String data) {
if (data == null)
- throw new IllegalArgumentException("Null not URI");
+ throw new IllegalArgumentException("Null not IRI");
URIUtil.getLocalNameIndex(data);
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURIPrefix.java b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRIPrefix.java
similarity index 86%
rename from common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURIPrefix.java
rename to common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRIPrefix.java
index 094eb65..3251237 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURIPrefix.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRIPrefix.java
@@ -27,17 +27,17 @@
* Date: 7/24/12
* Time: 3:26 PM
*/
-public class RyaURIPrefix extends RyaURIRange {
+public class RyaIRIPrefix extends RyaIRIRange {
public static final String LAST = "\u00FF";
- public RyaURIPrefix(String prefix) {
+ public RyaIRIPrefix(String prefix) {
super();
setPrefix(prefix);
}
public void setPrefix(String prefix) {
- setStart(new RyaURI(prefix + RdfCloudTripleStoreConstants.DELIM));
- setStop(new RyaURI(prefix + LAST));
+ setStart(new RyaIRI(prefix + RdfCloudTripleStoreConstants.DELIM));
+ setStop(new RyaIRI(prefix + LAST));
}
public String getPrefix() {
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURIRange.java b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRIRange.java
similarity index 81%
rename from common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURIRange.java
rename to common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRIRange.java
index 7fa9289..177048e 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaURIRange.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaIRIRange.java
@@ -25,34 +25,34 @@
* Date: 7/17/12
* Time: 9:59 AM
*/
-public class RyaURIRange extends RyaURI implements RyaRange {
- public static final RyaURI LAST_URI = new RyaURI(((char) 255) + ":#" + ((char) 255));
+public class RyaIRIRange extends RyaIRI implements RyaRange {
+ public static final RyaIRI LAST_IRI = new RyaIRI(((char) 255) + ":#" + ((char) 255));
- private RyaURI start;
- private RyaURI stop;
+ private RyaIRI start;
+ private RyaIRI stop;
- public RyaURIRange() {
+ public RyaIRIRange() {
super();
}
- public RyaURIRange(RyaURI start, RyaURI stop) {
+ public RyaIRIRange(RyaIRI start, RyaIRI stop) {
this.start = start;
this.stop = stop;
}
- public RyaURI getStart() {
+ public RyaIRI getStart() {
return start;
}
- public void setStart(RyaURI start) {
+ public void setStart(RyaIRI start) {
this.start = start;
}
- public RyaURI getStop() {
+ public RyaIRI getStop() {
return stop;
}
- public void setStop(RyaURI stop) {
+ public void setStop(RyaIRI stop) {
this.stop = stop;
}
@@ -64,7 +64,7 @@
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
- sb.append("RyaURIRange");
+ sb.append("RyaIRIRange");
sb.append("{start=").append(start);
sb.append(", stop=").append(stop);
sb.append('}');
@@ -77,7 +77,7 @@
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
- RyaURIRange that = (RyaURIRange) o;
+ RyaIRIRange that = (RyaIRIRange) o;
if (start != null ? !start.equals(that.start) : that.start != null) return false;
if (stop != null ? !stop.equals(that.stop) : that.stop != null) return false;
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaStatement.java b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaStatement.java
index eac6740..4d870a8 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaStatement.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaStatement.java
@@ -26,10 +26,10 @@
* Time: 7:20 AM
*/
public class RyaStatement {
- private RyaURI subject;
- private RyaURI predicate;
+ private RyaIRI subject;
+ private RyaIRI predicate;
private RyaType object;
- private RyaURI context;
+ private RyaIRI context;
private String qualifer;
private byte[] columnVisibility;
private byte[] value;
@@ -38,34 +38,34 @@
public RyaStatement() {
}
- public RyaStatement(final RyaURI subject, final RyaURI predicate, final RyaType object) {
+ public RyaStatement(final RyaIRI subject, final RyaIRI predicate, final RyaType object) {
this(subject, predicate, object, null);
}
- public RyaStatement(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context) {
+ public RyaStatement(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context) {
this(subject, predicate, object, context, null);
}
- public RyaStatement(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context, final String qualifier) {
+ public RyaStatement(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context, final String qualifier) {
this(subject, predicate, object, context, qualifier, new StatementMetadata());
}
- public RyaStatement(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context, final String qualifier, final StatementMetadata metadata) {
+ public RyaStatement(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context, final String qualifier, final StatementMetadata metadata) {
this(subject, predicate, object, context, qualifier, metadata, null);
}
- public RyaStatement(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context, final String qualifier, final StatementMetadata metadata, final byte[] columnVisibility) {
+ public RyaStatement(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context, final String qualifier, final StatementMetadata metadata, final byte[] columnVisibility) {
this(subject, predicate, object, context, qualifier, columnVisibility, metadata.toBytes());
}
@Deprecated
- public RyaStatement(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context, final String qualifier, final byte[] columnVisibility, final byte[] value) {
+ public RyaStatement(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context, final String qualifier, final byte[] columnVisibility, final byte[] value) {
this(subject, predicate, object, context, qualifier, columnVisibility, value, null);
}
@Deprecated
- public RyaStatement(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context, final String qualifier, final byte[] columnVisibility, final byte[] value, final Long timestamp) {
+ public RyaStatement(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context, final String qualifier, final byte[] columnVisibility, final byte[] value, final Long timestamp) {
this.subject = subject;
this.predicate = predicate;
this.object = object;
@@ -76,19 +76,19 @@
this.timestamp = timestamp != null ? timestamp : System.currentTimeMillis();
}
- public RyaURI getSubject() {
+ public RyaIRI getSubject() {
return subject;
}
- public void setSubject(final RyaURI subject) {
+ public void setSubject(final RyaIRI subject) {
this.subject = subject;
}
- public RyaURI getPredicate() {
+ public RyaIRI getPredicate() {
return predicate;
}
- public void setPredicate(final RyaURI predicate) {
+ public void setPredicate(final RyaIRI predicate) {
this.predicate = predicate;
}
@@ -100,11 +100,11 @@
this.object = object;
}
- public RyaURI getContext() {
+ public RyaIRI getContext() {
return context;
}
- public void setContext(final RyaURI context) {
+ public void setContext(final RyaIRI context) {
this.context = context;
}
@@ -273,18 +273,18 @@
return this;
}
- public RyaStatementBuilder setContext(final RyaURI ryaURI) {
- ryaStatement.setContext(ryaURI);
+ public RyaStatementBuilder setContext(final RyaIRI ryaIRI) {
+ ryaStatement.setContext(ryaIRI);
return this;
}
- public RyaStatementBuilder setSubject(final RyaURI ryaURI) {
- ryaStatement.setSubject(ryaURI);
+ public RyaStatementBuilder setSubject(final RyaIRI ryaIRI) {
+ ryaStatement.setSubject(ryaIRI);
return this;
}
- public RyaStatementBuilder setPredicate(final RyaURI ryaURI) {
- ryaStatement.setPredicate(ryaURI);
+ public RyaStatementBuilder setPredicate(final RyaIRI ryaIRI) {
+ ryaStatement.setPredicate(ryaIRI);
return this;
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaTypeUtils.java b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaTypeUtils.java
index 3136af3..505c8ba 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaTypeUtils.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/domain/RyaTypeUtils.java
@@ -45,8 +45,8 @@
.put(Long.class, (v) -> longRyaType((Long) v))
.put(Short.class, (v) -> shortRyaType((Short) v))
.put(String.class, (v) -> stringRyaType((String) v))
- .put(IRI.class, (v) -> uriRyaType((IRI) v))
- .put(SimpleIRI.class, (v) -> uriRyaType((SimpleIRI) v))
+ .put(IRI.class, (v) -> iriRyaType((IRI) v))
+ .put(SimpleIRI.class, (v) -> iriRyaType((SimpleIRI) v))
.build();
/**
@@ -186,7 +186,7 @@
* @return the {@link RyaType} with the data type set to
* {@link XMLSchema#ANYURI} and the data set to the specified {@code value}.
*/
- public static RyaType uriRyaType(final IRI value) {
+ public static RyaType iriRyaType(final IRI value) {
return new RyaType(XMLSchema.ANYURI, value.stringValue());
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/domain/StatementMetadata.java b/common/rya.api/src/main/java/org/apache/rya/api/domain/StatementMetadata.java
index 23fe2d3..13e656a 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/domain/StatementMetadata.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/domain/StatementMetadata.java
@@ -45,9 +45,9 @@
.registerTypeHierarchyAdapter(RyaType.class, new RyaTypeAdapter()).create();
public static StatementMetadata EMPTY_METADATA = new StatementMetadata();
- private Map<RyaURI, RyaType> metadataMap = new HashMap<>();
+ private Map<RyaIRI, RyaType> metadataMap = new HashMap<>();
@SuppressWarnings("serial")
- private Type type = new TypeToken<Map<RyaURI, RyaType>>(){}.getType();
+ private Type type = new TypeToken<Map<RyaIRI, RyaType>>(){}.getType();
public StatementMetadata() {}
@@ -77,11 +77,11 @@
}
}
- public void addMetadata(RyaURI key, RyaType value) {
+ public void addMetadata(RyaIRI key, RyaType value) {
metadataMap.put(key, value);
}
- public Map<RyaURI, RyaType> getMetadata() {
+ public Map<RyaIRI, RyaType> getMetadata() {
return metadataMap;
}
@@ -124,8 +124,8 @@
String[] array = element.getAsJsonPrimitive().getAsString().split("\u0000");
Preconditions.checkArgument(array.length == 2);
- if(type.equals(RyaURI.class.getName())){
- return new RyaURI(array[0]);
+ if(type.equals(RyaIRI.class.getName())){
+ return new RyaIRI(array[0]);
} else if(type.equals(RyaType.class.getName())){
RyaType ryaType = new RyaType(SimpleValueFactory.getInstance().createIRI(array[1]), array[0]);
return ryaType;
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/domain/serialization/kryo/RyaStatementSerializer.java b/common/rya.api/src/main/java/org/apache/rya/api/domain/serialization/kryo/RyaStatementSerializer.java
index 69a09bb..71de966 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/domain/serialization/kryo/RyaStatementSerializer.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/domain/serialization/kryo/RyaStatementSerializer.java
@@ -20,7 +20,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
@@ -115,16 +115,16 @@
String objectValue = input.readString();
RyaType value;
if (objectType.equals(XMLSchema.ANYURI.toString())){
- value = new RyaURI(objectValue);
+ value = new RyaIRI(objectValue);
}
else {
value = new RyaType(VF.createIRI(objectType), objectValue);
}
- RyaStatement statement = new RyaStatement(new RyaURI(subject), new RyaURI(predicate), value);
+ RyaStatement statement = new RyaStatement(new RyaIRI(subject), new RyaIRI(predicate), value);
int length = 0;
boolean hasNextValue = input.readBoolean();
if (hasNextValue){
- statement.setContext(new RyaURI(input.readString()));
+ statement.setContext(new RyaIRI(input.readString()));
}
hasNextValue = input.readBoolean();
if (hasNextValue){
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/persist/RyaDAO.java b/common/rya.api/src/main/java/org/apache/rya/api/persist/RyaDAO.java
index d83a5e9..2820beb 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/persist/RyaDAO.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/persist/RyaDAO.java
@@ -25,7 +25,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.query.RyaQueryEngine;
/**
@@ -89,7 +89,7 @@
* @param conf
* @throws RyaDAOException
*/
- public void dropGraph(C conf, RyaURI... graphs) throws RyaDAOException;
+ public void dropGraph(C conf, RyaIRI... graphs) throws RyaDAOException;
/**
* Delete a collection of RyaStatements.
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/persist/index/RyaSecondaryIndexer.java b/common/rya.api/src/main/java/org/apache/rya/api/persist/index/RyaSecondaryIndexer.java
index 2696e5b..0ac31e6 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/persist/index/RyaSecondaryIndexer.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/persist/index/RyaSecondaryIndexer.java
@@ -27,7 +27,7 @@
import org.apache.hadoop.conf.Configurable;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.model.IRI;
public interface RyaSecondaryIndexer extends Closeable, Flushable, Configurable {
@@ -50,7 +50,7 @@
public void deleteStatement(RyaStatement stmt) throws IOException;
- public void dropGraph(RyaURI... graphs);
+ public void dropGraph(RyaIRI... graphs);
/**
* @return the set of predicates indexed by the indexer.
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/HashJoin.java b/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/HashJoin.java
index 65c01a7..209e9d8 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/HashJoin.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/HashJoin.java
@@ -27,7 +27,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.RyaQueryEngine;
import org.apache.rya.api.resolver.RyaContext;
@@ -54,20 +54,20 @@
}
@Override
- public CloseableIteration<RyaStatement, RyaDAOException> join(C conf, RyaURI... preds) throws RyaDAOException {
- ConcurrentHashMap<Map.Entry<RyaURI, RyaType>, Integer> ht = new ConcurrentHashMap<Map.Entry<RyaURI, RyaType>, Integer>();
+ public CloseableIteration<RyaStatement, RyaDAOException> join(C conf, RyaIRI... preds) throws RyaDAOException {
+ ConcurrentHashMap<Map.Entry<RyaIRI, RyaType>, Integer> ht = new ConcurrentHashMap<Map.Entry<RyaIRI, RyaType>, Integer>();
int count = 0;
boolean first = true;
- for (RyaURI pred : preds) {
+ for (RyaIRI pred : preds) {
count++;
//query
CloseableIteration<RyaStatement, RyaDAOException> results = ryaQueryEngine.query(new RyaStatement(null, pred, null), null);
//add to hashtable
while (results.hasNext()) {
RyaStatement next = results.next();
- RyaURI subject = next.getSubject();
+ RyaIRI subject = next.getSubject();
RyaType object = next.getObject();
- Map.Entry<RyaURI, RyaType> entry = new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(subject, object);
+ Map.Entry<RyaIRI, RyaType> entry = new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(subject, object);
if (!first) {
if (!ht.containsKey(entry)) {
continue; //not in join
@@ -79,14 +79,14 @@
if (first) {
first = false;
} else {
- for (Map.Entry<Map.Entry<RyaURI, RyaType>, Integer> entry : ht.entrySet()) {
+ for (Map.Entry<Map.Entry<RyaIRI, RyaType>, Integer> entry : ht.entrySet()) {
if (entry.getValue() < count) {
ht.remove(entry.getKey());
}
}
}
}
- final Enumeration<Map.Entry<RyaURI, RyaType>> keys = ht.keys();
+ final Enumeration<Map.Entry<RyaIRI, RyaType>> keys = ht.keys();
return new CloseableIteration<RyaStatement, RyaDAOException>() {
@Override
public void close() throws RyaDAOException {
@@ -100,7 +100,7 @@
@Override
public RyaStatement next() throws RyaDAOException {
- Map.Entry<RyaURI, RyaType> subjObj = keys.nextElement();
+ Map.Entry<RyaIRI, RyaType> subjObj = keys.nextElement();
return new RyaStatement(subjObj.getKey(), null, subjObj.getValue());
}
@@ -112,19 +112,19 @@
}
@Override
- public CloseableIteration<RyaURI, RyaDAOException> join(C conf, Map.Entry<RyaURI, RyaType>... predObjs) throws RyaDAOException {
- ConcurrentHashMap<RyaURI, Integer> ht = new ConcurrentHashMap<RyaURI, Integer>();
+ public CloseableIteration<RyaIRI, RyaDAOException> join(C conf, Map.Entry<RyaIRI, RyaType>... predObjs) throws RyaDAOException {
+ ConcurrentHashMap<RyaIRI, Integer> ht = new ConcurrentHashMap<RyaIRI, Integer>();
int count = 0;
boolean first = true;
- for (Map.Entry<RyaURI, RyaType> predObj : predObjs) {
+ for (Map.Entry<RyaIRI, RyaType> predObj : predObjs) {
count++;
- RyaURI pred = predObj.getKey();
+ RyaIRI pred = predObj.getKey();
RyaType obj = predObj.getValue();
//query
CloseableIteration<RyaStatement, RyaDAOException> results = ryaQueryEngine.query(new RyaStatement(null, pred, obj), null);
//add to hashtable
while (results.hasNext()) {
- RyaURI subject = results.next().getSubject();
+ RyaIRI subject = results.next().getSubject();
if (!first) {
if (!ht.containsKey(subject)) {
continue; //not in join
@@ -136,14 +136,14 @@
if (first) {
first = false;
} else {
- for (Map.Entry<RyaURI, Integer> entry : ht.entrySet()) {
+ for (Map.Entry<RyaIRI, Integer> entry : ht.entrySet()) {
if (entry.getValue() < count) {
ht.remove(entry.getKey());
}
}
}
}
- return new EnumerationWrapper<RyaURI, RyaDAOException>(ht.keys());
+ return new EnumerationWrapper<RyaIRI, RyaDAOException>(ht.keys());
}
public RyaQueryEngine getRyaQueryEngine() {
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/IterativeJoin.java b/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/IterativeJoin.java
index 9bf216c..3c1d659 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/IterativeJoin.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/IterativeJoin.java
@@ -27,7 +27,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.RyaQueryEngine;
import org.apache.rya.api.resolver.RyaContext;
@@ -60,14 +60,14 @@
* @return
*/
@Override
- public CloseableIteration<RyaStatement, RyaDAOException> join(C conf, RyaURI... preds)
+ public CloseableIteration<RyaStatement, RyaDAOException> join(C conf, RyaIRI... preds)
throws RyaDAOException {
Preconditions.checkNotNull(preds);
Preconditions.checkArgument(preds.length > 1, "Must join 2 or more");
//TODO: Reorder predObjs based on statistics
CloseableIteration<RyaStatement, RyaDAOException> iter = null;
- for (RyaURI pred : preds) {
+ for (RyaIRI pred : preds) {
if (iter == null) {
iter = ryaQueryEngine.query(new RyaStatement(null, pred, null), null);
} else {
@@ -88,22 +88,22 @@
*
*/
@Override
- public CloseableIteration<RyaURI, RyaDAOException> join(C conf, Map.Entry<RyaURI, RyaType>... predObjs)
+ public CloseableIteration<RyaIRI, RyaDAOException> join(C conf, Map.Entry<RyaIRI, RyaType>... predObjs)
throws RyaDAOException {
Preconditions.checkNotNull(predObjs);
Preconditions.checkArgument(predObjs.length > 1, "Must join 2 or more");
//TODO: Reorder predObjs based on statistics
CloseableIteration<RyaStatement, RyaDAOException> first = null;
- CloseableIteration<RyaURI, RyaDAOException> iter = null;
- for (Map.Entry<RyaURI, RyaType> entry : predObjs) {
+ CloseableIteration<RyaIRI, RyaDAOException> iter = null;
+ for (Map.Entry<RyaIRI, RyaType> entry : predObjs) {
if (first == null) {
first = ryaQueryEngine.query(new RyaStatement(null, entry.getKey(), entry.getValue()), null);
} else if (iter == null) {
- iter = join(new ConvertingIteration<RyaStatement, RyaURI, RyaDAOException>(first) {
+ iter = join(new ConvertingIteration<RyaStatement, RyaIRI, RyaDAOException>(first) {
@Override
- protected RyaURI convert(RyaStatement statement) throws RyaDAOException {
+ protected RyaIRI convert(RyaStatement statement) throws RyaDAOException {
return statement.getSubject();
}
}, entry);
@@ -115,12 +115,12 @@
return iter;
}
- protected CloseableIteration<RyaURI, RyaDAOException> join(final CloseableIteration<RyaURI, RyaDAOException> iteration,
- final Map.Entry<RyaURI, RyaType> predObj) {
+ protected CloseableIteration<RyaIRI, RyaDAOException> join(final CloseableIteration<RyaIRI, RyaDAOException> iteration,
+ final Map.Entry<RyaIRI, RyaType> predObj) {
//TODO: configure batch
//TODO: batch = 1, does not work
final int batch = 100;
- return new CloseableIteration<RyaURI, RyaDAOException>() {
+ return new CloseableIteration<RyaIRI, RyaDAOException>() {
private CloseableIteration<Map.Entry<RyaStatement, BindingSet>, RyaDAOException> query;
@@ -138,7 +138,7 @@
}
@Override
- public RyaURI next() throws RyaDAOException {
+ public RyaIRI next() throws RyaDAOException {
if (query == null || !query.hasNext()) {
if (!batchNext()) return null;
}
@@ -170,7 +170,7 @@
}
protected CloseableIteration<RyaStatement, RyaDAOException> join(
- final CloseableIteration<RyaStatement, RyaDAOException> iteration, final RyaURI pred) {
+ final CloseableIteration<RyaStatement, RyaDAOException> iteration, final RyaIRI pred) {
//TODO: configure batch
//TODO: batch = 1, does not work
final int batch = 100;
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/Join.java b/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/Join.java
index 3334cd8..21ce1a2 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/Join.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/Join.java
@@ -24,7 +24,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
@@ -34,9 +34,9 @@
*/
public interface Join<C extends RdfCloudTripleStoreConfiguration> {
- public CloseableIteration<RyaStatement, RyaDAOException> join(C conf, RyaURI... preds)
+ public CloseableIteration<RyaStatement, RyaDAOException> join(C conf, RyaIRI... preds)
throws RyaDAOException;
- public CloseableIteration<RyaURI, RyaDAOException> join(C conf, Map.Entry<RyaURI, RyaType>... predObjs)
+ public CloseableIteration<RyaIRI, RyaDAOException> join(C conf, Map.Entry<RyaIRI, RyaType>... predObjs)
throws RyaDAOException;
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/MergeJoin.java b/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/MergeJoin.java
index c858327..327ff39 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/MergeJoin.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/persist/query/join/MergeJoin.java
@@ -27,8 +27,8 @@
import org.apache.rya.api.domain.RyaRange;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
-import org.apache.rya.api.domain.RyaURIRange;
+import org.apache.rya.api.domain.RyaIRI;
+import org.apache.rya.api.domain.RyaIRIRange;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.RyaQueryEngine;
import org.apache.rya.api.resolver.RyaContext;
@@ -61,13 +61,13 @@
* @return
*/
@Override
- public CloseableIteration<RyaStatement, RyaDAOException> join(C conf, RyaURI... preds)
+ public CloseableIteration<RyaStatement, RyaDAOException> join(C conf, RyaIRI... preds)
throws RyaDAOException {
Preconditions.checkNotNull(preds);
Preconditions.checkArgument(preds.length > 1, "Must join 2 or more");
//TODO: Reorder predObjs based on statistics
final List<CloseableIteration<RyaStatement, RyaDAOException>> iters = new ArrayList<CloseableIteration<RyaStatement, RyaDAOException>>();
- for (RyaURI predicate : preds) {
+ for (RyaIRI predicate : preds) {
Preconditions.checkArgument(predicate != null && !(predicate instanceof RyaRange));
CloseableIteration<RyaStatement, RyaDAOException> iter = ryaQueryEngine.query(new RyaStatement(null, predicate, null), conf);
@@ -146,16 +146,16 @@
* @throws RyaDAOException
*/
@Override
- public CloseableIteration<RyaURI, RyaDAOException> join(C conf, Map.Entry<RyaURI, RyaType>... predObjs)
+ public CloseableIteration<RyaIRI, RyaDAOException> join(C conf, Map.Entry<RyaIRI, RyaType>... predObjs)
throws RyaDAOException {
Preconditions.checkNotNull(predObjs);
Preconditions.checkArgument(predObjs.length > 1, "Must join 2 or more");
//TODO: Reorder predObjs based on statistics
final List<CloseableIteration<RyaStatement, RyaDAOException>> iters = new ArrayList<CloseableIteration<RyaStatement, RyaDAOException>>();
- RyaURI earliest_subject = null;
- for (Map.Entry<RyaURI, RyaType> predObj : predObjs) {
- RyaURI predicate = predObj.getKey();
+ RyaIRI earliest_subject = null;
+ for (Map.Entry<RyaIRI, RyaType> predObj : predObjs) {
+ RyaIRI predicate = predObj.getKey();
RyaType object = predObj.getValue();
Preconditions.checkArgument(predicate != null && !(predicate instanceof RyaRange));
Preconditions.checkArgument(object != null && !(object instanceof RyaRange));
@@ -166,10 +166,10 @@
ryaQueryEngine.query(new RyaStatement(null, predicate, object), conf));
} else {
iter = new PeekingCloseableIteration<RyaStatement, RyaDAOException>(
- ryaQueryEngine.query(new RyaStatement(new RyaURIRange(earliest_subject, RyaURIRange.LAST_URI), predicate, object), conf));
+ ryaQueryEngine.query(new RyaStatement(new RyaIRIRange(earliest_subject, RyaIRIRange.LAST_IRI), predicate, object), conf));
}
if (!iter.hasNext()) {
- return new EmptyIteration<RyaURI, RyaDAOException>();
+ return new EmptyIteration<RyaIRI, RyaDAOException>();
}
//setting up range to make performant query
earliest_subject = iter.peek().getSubject();
@@ -181,9 +181,9 @@
//perform merge operation
- return new CloseableIteration<RyaURI, RyaDAOException>() {
+ return new CloseableIteration<RyaIRI, RyaDAOException>() {
- private RyaURI first_subj;
+ private RyaIRI first_subj;
@Override
public void close() throws RyaDAOException {
@@ -198,14 +198,14 @@
}
@Override
- public RyaURI next() throws RyaDAOException {
+ public RyaIRI next() throws RyaDAOException {
if (first_subj != null) {
- RyaURI temp = first_subj;
+ RyaIRI temp = first_subj;
first_subj = null;
return temp;
}
if (check()) {
- RyaURI temp = first_subj;
+ RyaIRI temp = first_subj;
first_subj = null;
return temp;
}
@@ -222,7 +222,7 @@
first_subj = first.next().getSubject();
for (CloseableIteration<RyaStatement, RyaDAOException> iter : iters) {
if (!iter.hasNext()) return false; //no more left to join
- RyaURI iter_subj = iter.next().getSubject();
+ RyaIRI iter_subj = iter.next().getSubject();
while (first_subj.compareTo(iter_subj) < 0) {
if (!first.hasNext()) return false;
first_subj = first.next().getSubject();
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/TriplePatternStrategy.java b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/TriplePatternStrategy.java
index 15a3a88..d8c8226 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/TriplePatternStrategy.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/TriplePatternStrategy.java
@@ -25,7 +25,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.triple.TripleRowRegex;
/**
@@ -34,12 +34,12 @@
*/
public interface TriplePatternStrategy {
- public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(RyaURI subject, RyaURI predicate, RyaType object, RyaURI context,
+ public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(RyaIRI subject, RyaIRI predicate, RyaType object, RyaIRI context,
RdfCloudTripleStoreConfiguration conf) throws IOException;
public TABLE_LAYOUT getLayout();
- public boolean handles(RyaURI subject, RyaURI predicate, RyaType object, RyaURI context);
+ public boolean handles(RyaIRI subject, RyaIRI predicate, RyaType object, RyaIRI context);
public TripleRowRegex buildRegex(String subject, String predicate, String object, String context, byte[] objectTypeInfo);
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategy.java b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategy.java
index 6e8bb31..1b69721 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategy.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategy.java
@@ -34,7 +34,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaRange;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.query.strategy.ByteRange;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaTypeResolverException;
@@ -54,8 +54,8 @@
@Override
public Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT,
- ByteRange> defineRange(final RyaURI subject, final RyaURI predicate, final RyaType object,
- final RyaURI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
+ ByteRange> defineRange(final RyaIRI subject, final RyaIRI predicate, final RyaType object,
+ final RyaIRI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
try {
//po(ng)
//po_r(s)(ng)
@@ -122,7 +122,7 @@
}
@Override
- public boolean handles(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context) {
+ public boolean handles(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context) {
//po(ng)
//p_r(o)(ng)
//po_r(s)(ng)
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategy.java b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategy.java
index c87d268..42fd9d2 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategy.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategy.java
@@ -34,8 +34,8 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaRange;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
-import org.apache.rya.api.domain.RyaURIRange;
+import org.apache.rya.api.domain.RyaIRI;
+import org.apache.rya.api.domain.RyaIRIRange;
import org.apache.rya.api.query.strategy.ByteRange;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaTypeResolverException;
@@ -55,8 +55,8 @@
}
@Override
- public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(final RyaURI subject, final RyaURI predicate, final RyaType object,
- final RyaURI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
+ public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(final RyaIRI subject, final RyaIRI predicate, final RyaType object,
+ final RyaIRI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
try {
//spo(ng)
//sp(ng)
@@ -134,8 +134,8 @@
}
@Override
- public boolean handles(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context) {
+ public boolean handles(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context) {
//if subject is not null and not a range (if predicate is null then object must be null)
- return (subject != null && !(subject instanceof RyaURIRange)) && !((predicate == null || predicate instanceof RyaURIRange) && (object != null));
+ return (subject != null && !(subject instanceof RyaIRIRange)) && !((predicate == null || predicate instanceof RyaIRIRange) && (object != null));
}
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategy.java b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategy.java
index 5398fc0..afc3af2 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategy.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategy.java
@@ -28,7 +28,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.query.strategy.AbstractTriplePatternStrategy;
import org.apache.rya.api.query.strategy.ByteRange;
@@ -40,15 +40,15 @@
}
@Override
- public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(RyaURI subject, RyaURI predicate, RyaType object,
- RyaURI context, RdfCloudTripleStoreConfiguration conf) throws IOException {
+ public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(RyaIRI subject, RyaIRI predicate, RyaType object,
+ RyaIRI context, RdfCloudTripleStoreConfiguration conf) throws IOException {
byte[] start = new byte[]{ /* empty array */ }; // Scan from the beginning of the Accumulo Table
byte[] stop = LAST_BYTES; // Scan to the end, up through things beginning with 0xff.
return new RdfCloudTripleStoreUtils.CustomEntry<>(TABLE_LAYOUT.SPO, new ByteRange(start, stop));
}
@Override
- public boolean handles(RyaURI subject, RyaURI predicate, RyaType object, RyaURI context) {
+ public boolean handles(RyaIRI subject, RyaIRI predicate, RyaType object, RyaIRI context) {
return subject == null && predicate == null && object == null;
}
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategy.java b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategy.java
index 98861c0..a9706dc 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategy.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategy.java
@@ -30,7 +30,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaRange;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.query.strategy.AbstractTriplePatternStrategy;
import org.apache.rya.api.query.strategy.ByteRange;
import org.apache.rya.api.resolver.RyaContext;
@@ -51,8 +51,8 @@
@Override
public Map.Entry<TABLE_LAYOUT,
- ByteRange> defineRange(final RyaURI subject, final RyaURI predicate, final RyaType object,
- final RyaURI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
+ ByteRange> defineRange(final RyaIRI subject, final RyaIRI predicate, final RyaType object,
+ final RyaIRI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
try {
//os(ng)
//o_r(s)(ng)
@@ -103,7 +103,7 @@
}
@Override
- public boolean handles(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context) {
+ public boolean handles(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context) {
//os(ng)
//o_r(s)(ng)
//o(ng)
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategy.java b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategy.java
index e09e5d0..dbf8023 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategy.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategy.java
@@ -31,7 +31,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaRange;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.query.strategy.AbstractTriplePatternStrategy;
import org.apache.rya.api.query.strategy.ByteRange;
import org.apache.rya.api.resolver.RyaContext;
@@ -52,8 +52,8 @@
@Override
public Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT,
- ByteRange> defineRange(final RyaURI subject, final RyaURI predicate, final RyaType object,
- final RyaURI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
+ ByteRange> defineRange(final RyaIRI subject, final RyaIRI predicate, final RyaType object,
+ final RyaIRI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
try {
//po(ng)
//po_r(s)(ng)
@@ -116,7 +116,7 @@
}
@Override
- public boolean handles(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context) {
+ public boolean handles(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context) {
//po(ng)
//p_r(o)(ng)
//po_r(s)(ng)
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategy.java b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategy.java
index b2c29bb..eed3ab0 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategy.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategy.java
@@ -31,8 +31,8 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaRange;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
-import org.apache.rya.api.domain.RyaURIRange;
+import org.apache.rya.api.domain.RyaIRI;
+import org.apache.rya.api.domain.RyaIRIRange;
import org.apache.rya.api.query.strategy.AbstractTriplePatternStrategy;
import org.apache.rya.api.query.strategy.ByteRange;
import org.apache.rya.api.resolver.RyaContext;
@@ -52,8 +52,8 @@
}
@Override
- public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(final RyaURI subject, final RyaURI predicate, final RyaType object,
- final RyaURI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
+ public Map.Entry<TABLE_LAYOUT, ByteRange> defineRange(final RyaIRI subject, final RyaIRI predicate, final RyaType object,
+ final RyaIRI context, final RdfCloudTripleStoreConfiguration conf) throws IOException {
try {
//spo(ng)
//sp(ng)
@@ -127,8 +127,8 @@
}
@Override
- public boolean handles(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context) {
+ public boolean handles(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context) {
//if subject is not null and (if predicate is null then object must be null)
- return (subject != null && !(subject instanceof RyaURIRange && predicate != null)) && !((predicate == null || predicate instanceof RyaURIRange) && (object != null));
+ return (subject != null && !(subject instanceof RyaIRIRange && predicate != null)) && !((predicate == null || predicate instanceof RyaIRIRange) && (object != null));
}
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RdfToRyaConversions.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RdfToRyaConversions.java
index fca31e4..0618c82 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RdfToRyaConversions.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RdfToRyaConversions.java
@@ -19,14 +19,14 @@
* under the License.
*/
-import org.apache.rya.api.domain.RangeURI;
+import org.apache.rya.api.domain.RangeIRI;
import org.apache.rya.api.domain.RangeValue;
import org.apache.rya.api.domain.RyaSchema;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
import org.apache.rya.api.domain.RyaTypeRange;
-import org.apache.rya.api.domain.RyaURI;
-import org.apache.rya.api.domain.RyaURIRange;
+import org.apache.rya.api.domain.RyaIRI;
+import org.apache.rya.api.domain.RyaIRIRange;
import org.eclipse.rdf4j.model.BNode;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Literal;
@@ -40,13 +40,13 @@
*/
public class RdfToRyaConversions {
- public static RyaURI convertURI(IRI iri) {
+ public static RyaIRI convertIRI(IRI iri) {
if (iri == null) return null;
- if (iri instanceof RangeURI) {
- RangeURI riri = (RangeURI) iri;
- return new RyaURIRange(convertURI(riri.getStart()), convertURI(riri.getEnd()));
+ if (iri instanceof RangeIRI) {
+ RangeIRI riri = (RangeIRI) iri;
+ return new RyaIRIRange(convertIRI(riri.getStart()), convertIRI(riri.getEnd()));
}
- return new RyaURI(iri.stringValue());
+ return new RyaIRI(iri.stringValue());
}
public static RyaType convertLiteral(Literal literal) {
@@ -70,7 +70,7 @@
if (value instanceof RangeValue) {
RangeValue<?> rv = (RangeValue<?>) value;
if (rv.getStart() instanceof IRI) {
- return new RyaURIRange(convertURI((IRI) rv.getStart()), convertURI((IRI) rv.getEnd()));
+ return new RyaIRIRange(convertIRI((IRI) rv.getStart()), convertIRI((IRI) rv.getEnd()));
} else {
//literal
return new RyaTypeRange(convertLiteral((Literal) rv.getStart()), convertLiteral((Literal) rv.getEnd()));
@@ -79,12 +79,12 @@
return null;
}
- public static RyaURI convertResource(Resource subject) {
+ public static RyaIRI convertResource(Resource subject) {
if(subject == null) return null;
if (subject instanceof BNode) {
- return new RyaURI(RyaSchema.BNODE_NAMESPACE + ((BNode) subject).getID());
+ return new RyaIRI(RyaSchema.BNODE_NAMESPACE + ((BNode) subject).getID());
}
- return convertURI((IRI) subject);
+ return convertIRI((IRI) subject);
}
public static RyaStatement convertStatement(Statement statement) {
@@ -95,7 +95,7 @@
Resource context = statement.getContext();
return new RyaStatement(
convertResource(subject),
- convertURI(predicate),
+ convertIRI(predicate),
convertValue(object),
convertResource(context));
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaContext.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaContext.java
index 237a228..bc0c6df 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaContext.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaContext.java
@@ -34,7 +34,7 @@
import org.apache.rya.api.resolver.impl.IntegerRyaTypeResolver;
import org.apache.rya.api.resolver.impl.LongRyaTypeResolver;
import org.apache.rya.api.resolver.impl.RyaTypeResolverImpl;
-import org.apache.rya.api.resolver.impl.RyaURIResolver;
+import org.apache.rya.api.resolver.impl.RyaIRIResolver;
import org.apache.rya.api.resolver.impl.ServiceBackedRyaTypeResolverMappings;
import org.apache.rya.api.resolver.impl.ShortRyaTypeResolver;
import org.eclipse.rdf4j.model.IRI;
@@ -64,7 +64,7 @@
logger.debug("Adding default mappings");
}
addRyaTypeResolverMapping(new RyaTypeResolverMapping(new RyaTypeResolverImpl())); // plain string
- addRyaTypeResolverMapping(new RyaTypeResolverMapping(new RyaURIResolver())); // uri
+ addRyaTypeResolverMapping(new RyaTypeResolverMapping(new RyaIRIResolver())); // iri
addRyaTypeResolverMapping(new RyaTypeResolverMapping(new DateTimeRyaTypeResolver())); // dateTime
addRyaTypeResolverMapping(new RyaTypeResolverMapping(new DoubleRyaTypeResolver())); // double
addRyaTypeResolverMapping(new RyaTypeResolverMapping(new FloatRyaTypeResolver())); // float
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaToRdfConversions.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaToRdfConversions.java
index b43bdaa..88b79bf 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaToRdfConversions.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaToRdfConversions.java
@@ -21,7 +21,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Literal;
import org.eclipse.rdf4j.model.Statement;
@@ -37,11 +37,11 @@
public class RyaToRdfConversions {
private static final ValueFactory VF = SimpleValueFactory.getInstance();
- public static IRI convertURI(RyaURI iri) {
+ public static IRI convertIRI(RyaIRI iri) {
return VF.createIRI(iri.getData());
}
- private static IRI convertURI(RyaType value) {
+ private static IRI convertIRI(RyaType value) {
return VF.createIRI(value.getData());
}
@@ -56,19 +56,19 @@
public static Value convertValue(RyaType value) {
//assuming either IRI or Literal here
- return (value instanceof RyaURI || value.getDataType().equals(XMLSchema.ANYURI)) ? convertURI(value) : convertLiteral(value);
+ return (value instanceof RyaIRI || value.getDataType().equals(XMLSchema.ANYURI)) ? convertIRI(value) : convertLiteral(value);
}
public static Statement convertStatement(RyaStatement statement) {
assert statement != null;
if (statement.getContext() != null) {
- return VF.createStatement(convertURI(statement.getSubject()),
- convertURI(statement.getPredicate()),
+ return VF.createStatement(convertIRI(statement.getSubject()),
+ convertIRI(statement.getPredicate()),
convertValue(statement.getObject()),
- convertURI(statement.getContext()));
+ convertIRI(statement.getContext()));
} else {
- return VF.createStatement(convertURI(statement.getSubject()),
- convertURI(statement.getPredicate()),
+ return VF.createStatement(convertIRI(statement.getSubject()),
+ convertIRI(statement.getPredicate()),
convertValue(statement.getObject()));
}
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java
index f3f5925..dc4a42e 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/RyaTripleContext.java
@@ -30,7 +30,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.query.strategy.TriplePatternStrategy;
import org.apache.rya.api.query.strategy.wholerow.HashedPoWholeRowTriplePatternStrategy;
import org.apache.rya.api.query.strategy.wholerow.HashedSpoWholeRowTriplePatternStrategy;
@@ -101,7 +101,7 @@
}
//retrieve triple pattern strategy
- public TriplePatternStrategy retrieveStrategy(final RyaURI subject, final RyaURI predicate, final RyaType object, final RyaURI context) {
+ public TriplePatternStrategy retrieveStrategy(final RyaIRI subject, final RyaIRI predicate, final RyaType object, final RyaIRI context) {
for (final TriplePatternStrategy strategy : triplePatternStrategyList) {
if (strategy.handles(subject, predicate, object, context)) {
return strategy;
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaURIResolver.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaIRIResolver.java
similarity index 87%
rename from common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaURIResolver.java
rename to common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaIRIResolver.java
index c7ac82c..0e4df4d 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaURIResolver.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/impl/RyaIRIResolver.java
@@ -20,23 +20,23 @@
*/
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
/**
* Date: 7/16/12
* Time: 12:41 PM
*/
-public class RyaURIResolver extends RyaTypeResolverImpl {
+public class RyaIRIResolver extends RyaTypeResolverImpl {
public static final int URI_MARKER = 2;
- public RyaURIResolver() {
+ public RyaIRIResolver() {
super((byte) URI_MARKER, XMLSchema.ANYURI);
}
@Override
public RyaType newInstance() {
- return new RyaURI();
+ return new RyaIRI();
}
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/TripleRowResolver.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/TripleRowResolver.java
index 62ac2b5..fd91751 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/TripleRowResolver.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/TripleRowResolver.java
@@ -24,7 +24,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import java.util.Map;
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/impl/WholeRowHashedTripleResolver.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/impl/WholeRowHashedTripleResolver.java
index 5907b5b..701ff02 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/impl/WholeRowHashedTripleResolver.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/impl/WholeRowHashedTripleResolver.java
@@ -34,7 +34,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaTypeResolverException;
import org.apache.rya.api.resolver.triple.TripleRow;
@@ -53,10 +53,10 @@
@Override
public Map<TABLE_LAYOUT, TripleRow> serialize(final RyaStatement stmt) throws TripleRowResolverException {
try {
- final RyaURI subject = stmt.getSubject();
- final RyaURI predicate = stmt.getPredicate();
+ final RyaIRI subject = stmt.getSubject();
+ final RyaIRI predicate = stmt.getPredicate();
final RyaType object = stmt.getObject();
- final RyaURI context = stmt.getContext();
+ final RyaIRI context = stmt.getContext();
final Long timestamp = stmt.getTimestamp();
final byte[] columnVisibility = stmt.getColumnVisibility();
final String qualifer = stmt.getQualifer();
@@ -115,7 +115,7 @@
final byte[] type = Arrays.copyOfRange(row, typeIndex, row.length);
final byte[] columnFamily = tripleRow.getColumnFamily();
final boolean contextExists = columnFamily != null && columnFamily.length > 0;
- final RyaURI context = (contextExists) ? (new RyaURI(new String(columnFamily, StandardCharsets.UTF_8))) : null;
+ final RyaIRI context = (contextExists) ? (new RyaIRI(new String(columnFamily, StandardCharsets.UTF_8))) : null;
final byte[] columnQualifier = tripleRow.getColumnQualifier();
final String qualifier = columnQualifier != null && columnQualifier.length > 0 ? new String(columnQualifier, StandardCharsets.UTF_8) : null;
final Long timestamp = tripleRow.getTimestamp();
@@ -126,24 +126,24 @@
case SPO: {
final byte[] obj = Bytes.concat(third, type);
return new RyaStatement(
- new RyaURI(new String(first, StandardCharsets.UTF_8)),
- new RyaURI(new String(second, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(first, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(second, StandardCharsets.UTF_8)),
RyaContext.getInstance().deserialize(obj),
context, qualifier, columnVisibility, value, timestamp);
}
case PO: {
final byte[] obj = Bytes.concat(second, type);
return new RyaStatement(
- new RyaURI(new String(third, StandardCharsets.UTF_8)),
- new RyaURI(new String(first, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(third, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(first, StandardCharsets.UTF_8)),
RyaContext.getInstance().deserialize(obj),
context, qualifier, columnVisibility, value, timestamp);
}
case OSP: {
final byte[] obj = Bytes.concat(first, type);
return new RyaStatement(
- new RyaURI(new String(second, StandardCharsets.UTF_8)),
- new RyaURI(new String(third, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(second, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(third, StandardCharsets.UTF_8)),
RyaContext.getInstance().deserialize(obj),
context, qualifier, columnVisibility, value, timestamp);
}
diff --git a/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/impl/WholeRowTripleResolver.java b/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/impl/WholeRowTripleResolver.java
index cbd65b6..994347f 100644
--- a/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/impl/WholeRowTripleResolver.java
+++ b/common/rya.api/src/main/java/org/apache/rya/api/resolver/triple/impl/WholeRowTripleResolver.java
@@ -31,7 +31,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaTypeResolverException;
import org.apache.rya.api.resolver.triple.TripleRow;
@@ -50,10 +50,10 @@
@Override
public Map<TABLE_LAYOUT, TripleRow> serialize(final RyaStatement stmt) throws TripleRowResolverException {
try {
- final RyaURI subject = stmt.getSubject();
- final RyaURI predicate = stmt.getPredicate();
+ final RyaIRI subject = stmt.getSubject();
+ final RyaIRI predicate = stmt.getPredicate();
final RyaType object = stmt.getObject();
- final RyaURI context = stmt.getContext();
+ final RyaIRI context = stmt.getContext();
final Long timestamp = stmt.getTimestamp();
final byte[] columnVisibility = stmt.getColumnVisibility();
final String qualifer = stmt.getQualifer();
@@ -100,7 +100,7 @@
final byte[] type = Arrays.copyOfRange(row, typeIndex, row.length);
final byte[] columnFamily = tripleRow.getColumnFamily();
final boolean contextExists = columnFamily != null && columnFamily.length > 0;
- final RyaURI context = (contextExists) ? (new RyaURI(new String(columnFamily, StandardCharsets.UTF_8))) : null;
+ final RyaIRI context = (contextExists) ? (new RyaIRI(new String(columnFamily, StandardCharsets.UTF_8))) : null;
final byte[] columnQualifier = tripleRow.getColumnQualifier();
final String qualifier = columnQualifier != null && columnQualifier.length > 0 ? new String(columnQualifier, StandardCharsets.UTF_8) : null;
final Long timestamp = tripleRow.getTimestamp();
@@ -111,24 +111,24 @@
case SPO: {
final byte[] obj = Bytes.concat(third, type);
return new RyaStatement(
- new RyaURI(new String(first, StandardCharsets.UTF_8)),
- new RyaURI(new String(second, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(first, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(second, StandardCharsets.UTF_8)),
RyaContext.getInstance().deserialize(obj),
context, qualifier, columnVisibility, value, timestamp);
}
case PO: {
final byte[] obj = Bytes.concat(second, type);
return new RyaStatement(
- new RyaURI(new String(third, StandardCharsets.UTF_8)),
- new RyaURI(new String(first, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(third, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(first, StandardCharsets.UTF_8)),
RyaContext.getInstance().deserialize(obj),
context, qualifier, columnVisibility, value, timestamp);
}
case OSP: {
final byte[] obj = Bytes.concat(first, type);
return new RyaStatement(
- new RyaURI(new String(second, StandardCharsets.UTF_8)),
- new RyaURI(new String(third, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(second, StandardCharsets.UTF_8)),
+ new RyaIRI(new String(third, StandardCharsets.UTF_8)),
RyaContext.getInstance().deserialize(obj),
context, qualifier, columnVisibility, value, timestamp);
}
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaURIPrefixTest.java b/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaIRIPrefixTest.java
similarity index 86%
rename from common/rya.api/src/test/java/org/apache/rya/api/domain/RyaURIPrefixTest.java
rename to common/rya.api/src/test/java/org/apache/rya/api/domain/RyaIRIPrefixTest.java
index dee896b..ab32406 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaURIPrefixTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaIRIPrefixTest.java
@@ -27,11 +27,11 @@
* Date: 7/24/12
* Time: 3:30 PM
*/
-public class RyaURIPrefixTest extends TestCase {
+public class RyaIRIPrefixTest extends TestCase {
public void testPrefix() throws Exception {
String prefix = "urn:test#";
- RyaURIPrefix uriPrefix = new RyaURIPrefix(prefix);
- assertEquals(prefix, uriPrefix.getPrefix());
+ RyaIRIPrefix iriPrefix = new RyaIRIPrefix(prefix);
+ assertEquals(prefix, iriPrefix.getPrefix());
}
}
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java b/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java
index fe1216a..7cfc77b 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/domain/RyaTypeTest.java
@@ -27,8 +27,8 @@
static RyaType a = new RyaType(XMLSchema.STRING, "http://www.example.com/Alice");
static RyaType b = new RyaType(XMLSchema.STRING, "http://www.example.com/Bob");
static RyaType c = new RyaType(XMLSchema.STRING, "http://www.example.com/Carol");
- static RyaType aUri = new RyaType(XMLSchema.ANYURI, "http://www.example.com/Alice");
- static RyaType bUri = new RyaType(XMLSchema.ANYURI, "http://www.example.com/Bob");
+ static RyaType aIri = new RyaType(XMLSchema.ANYURI, "http://www.example.com/Alice");
+ static RyaType bIri = new RyaType(XMLSchema.ANYURI, "http://www.example.com/Bob");
RyaType nullData = new RyaType(XMLSchema.STRING, null);
RyaType nullType = new RyaType(null, "http://www.example.com/Alice");
RyaType nullBoth = new RyaType(null, null);
@@ -36,10 +36,10 @@
@Test
public void testCompareTo() throws Exception {
- Assert.assertEquals("compareTo(self) should return zero.", 0, aUri.compareTo(aUri));
- Assert.assertFalse("compareTo should return nonzero for different data and type.", aUri.compareTo(b) == 0);
- Assert.assertFalse("compareTo should return nonzero for same data and different datatypes.", a.compareTo(aUri) == 0);
- Assert.assertFalse("compareTo should return nonzero for same datatype and different data.", bUri.compareTo(aUri) == 0);
+ Assert.assertEquals("compareTo(self) should return zero.", 0, aIri.compareTo(aIri));
+ Assert.assertFalse("compareTo should return nonzero for different data and type.", aIri.compareTo(b) == 0);
+ Assert.assertFalse("compareTo should return nonzero for same data and different datatypes.", a.compareTo(aIri) == 0);
+ Assert.assertFalse("compareTo should return nonzero for same datatype and different data.", bIri.compareTo(aIri) == 0);
Assert.assertEquals("compareTo should return zero for different objects with matching data and datatype.",
0, a.compareTo(same));
}
@@ -60,11 +60,11 @@
int forward = Integer.signum(a.compareTo(b));
int backward = Integer.signum(b.compareTo(a));
Assert.assertEquals("Comparison of different values with same type should yield opposite signs.", forward, backward * -1);
- forward = Integer.signum(bUri.compareTo(b));
- backward = Integer.signum(b.compareTo(bUri));
+ forward = Integer.signum(bIri.compareTo(b));
+ backward = Integer.signum(b.compareTo(bIri));
Assert.assertEquals("Comparison of same values with different types should yield opposite signs.", forward, backward*-1);
- forward = Integer.signum(aUri.compareTo(b));
- backward = Integer.signum(b.compareTo(aUri));
+ forward = Integer.signum(aIri.compareTo(b));
+ backward = Integer.signum(b.compareTo(aIri));
Assert.assertEquals("Comparison of different values with different types should yield opposite signs.",
forward, backward * -1);
}
@@ -80,7 +80,7 @@
@Test
public void testEquals() throws Exception {
Assert.assertTrue("Same data and datatype should be equal.", a.equals(same));
- Assert.assertFalse("Same data, different datatype should be unequal.", a.equals(aUri));
+ Assert.assertFalse("Same data, different datatype should be unequal.", a.equals(aIri));
Assert.assertFalse("Same datatype, different data should be unequal.", a.equals(b));
}
@@ -100,9 +100,9 @@
Assert.assertEquals("equals and compareTo inconsistent for different values with same types.",
a.equals(b), a.compareTo(b) == 0);
Assert.assertEquals("equals and compareTo inconsistent for same values having different types.",
- a.equals(aUri), a.compareTo(aUri) == 0);
+ a.equals(aIri), a.compareTo(aIri) == 0);
Assert.assertEquals("equals and compareTo inconsistent for different values and different types.",
- a.equals(bUri), a.compareTo(bUri) == 0);
+ a.equals(bIri), a.compareTo(bIri) == 0);
}
@Test
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java b/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java
index c316b50..fd7cb2a 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/domain/StatementMetadataTest.java
@@ -31,7 +31,7 @@
StatementMetadata single = new StatementMetadata();
- single.addMetadata(new RyaURI("http://uri"), new RyaType("http://type"));
+ single.addMetadata(new RyaIRI("http://uri"), new RyaType("http://type"));
byte[] singleData = single.toBytes();
Assert.assertArrayEquals(singleData, new StatementMetadata(singleData).toBytes());
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/persist/query/RyaQueryTest.java b/common/rya.api/src/test/java/org/apache/rya/api/persist/query/RyaQueryTest.java
index 967c6dc..b2c535d 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/persist/query/RyaQueryTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/persist/query/RyaQueryTest.java
@@ -22,7 +22,7 @@
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.junit.Test;
import java.util.Arrays;
@@ -37,9 +37,9 @@
@Test
public void testBuildQueryWithOptions() {
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
RyaStatement ryaStatement = new RyaStatement(subj, pred, obj);
String[] auths = {"U,FOUO"};
long currentTime = System.currentTimeMillis();
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java
index bd96436..66ca868 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/AbstractTriplePatternStrategyTest.java
@@ -31,7 +31,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.query.strategy.wholerow.OspWholeRowTriplePatternStrategy;
import org.apache.rya.api.query.strategy.wholerow.PoWholeRowTriplePatternStrategy;
import org.apache.rya.api.query.strategy.wholerow.SpoWholeRowTriplePatternStrategy;
@@ -59,9 +59,9 @@
}
public void testRegex() throws Exception {
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
RyaStatement ryaStatement = new RyaStatement(subj, pred, obj);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = new WholeRowTripleResolver().serialize(ryaStatement);
TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO);
@@ -117,8 +117,8 @@
}
public void testObjectTypeInfo() throws Exception {
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
RyaType obj = new RyaType(XMLSchema.LONG, "10");
RyaStatement ryaStatement = new RyaStatement(subj, pred, obj);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = RyaTripleContext.getInstance(new MockRdfConfiguration()).serializeTriple(ryaStatement);
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java
index 0775dfa..fe2c20c 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedPoWholeRowTriplePatternStrategyTest.java
@@ -27,8 +27,8 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
import org.apache.rya.api.domain.RyaTypeRange;
-import org.apache.rya.api.domain.RyaURI;
-import org.apache.rya.api.domain.RyaURIRange;
+import org.apache.rya.api.domain.RyaIRI;
+import org.apache.rya.api.domain.RyaIRIRange;
import org.apache.rya.api.query.strategy.ByteRange;
import org.apache.rya.api.query.strategy.TriplePatternStrategy;
import org.apache.rya.api.resolver.RyaContext;
@@ -49,10 +49,10 @@
public class HashedPoWholeRowTriplePatternStrategyTest extends TestCase {
private static final ValueFactory VF = SimpleValueFactory.getInstance();
- RyaURI uri = new RyaURI("urn:test#1234");
- RyaURI uri2 = new RyaURI("urn:test#1235");
- RyaURIRange rangeURI = new RyaURIRange(uri, uri2);
- RyaURIRange rangeURI2 = new RyaURIRange(new RyaURI("urn:test#1235"), new RyaURI("urn:test#1236"));
+ RyaIRI uri = new RyaIRI("urn:test#1234");
+ RyaIRI uri2 = new RyaIRI("urn:test#1235");
+ RyaIRIRange rangeIRI = new RyaIRIRange(uri, uri2);
+ RyaIRIRange rangeIRI2 = new RyaIRIRange(new RyaIRI("urn:test#1235"), new RyaIRI("urn:test#1236"));
HashedPoWholeRowTriplePatternStrategy strategy = new HashedPoWholeRowTriplePatternStrategy();
RyaContext ryaContext = RyaContext.getInstance();
RyaTripleContext ryaTripleContext;
@@ -72,9 +72,9 @@
public void testRegex() throws Exception {
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
RyaStatement ryaStatement = new RyaStatement(subj, pred, obj);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = new WholeRowHashedTripleResolver().serialize(ryaStatement);
TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO);
@@ -135,10 +135,10 @@
new RyaStatement(uri, uri, uri, null));
TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.PO);
- Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(null, uri, rangeURI, null, null);
+ Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(null, uri, rangeIRI, null, null);
assertContains(entry.getValue(), tripleRow.getRow());
- entry = strategy.defineRange(null, uri, rangeURI2, null, null);
+ entry = strategy.defineRange(null, uri, rangeIRI2, null, null);
assertContainsFalse(entry.getValue(), tripleRow.getRow());
}
@@ -197,15 +197,15 @@
new RyaStatement(uri, uri, uri, null));
TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.PO);
- Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(rangeURI, uri, uri, null, null);
+ Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(rangeIRI, uri, uri, null, null);
assertContains(entry.getValue(), tripleRow.getRow());
- entry = strategy.defineRange(rangeURI2, uri, uri, null, null);
+ entry = strategy.defineRange(rangeIRI2, uri, uri, null, null);
assertContainsFalse(entry.getValue(), tripleRow.getRow());
}
public void testPRange() throws Exception {
- Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(null, rangeURI, null, null, null);
+ Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(null, rangeIRI, null, null, null);
assertNull(entry);
}
@@ -222,22 +222,22 @@
assertTrue(strategy.handles(null, uri, uri, null));
assertTrue(strategy.handles(null, uri, uri, uri));
//po_r(s)(ng)
- assertTrue(strategy.handles(rangeURI, uri, uri, null));
- assertTrue(strategy.handles(rangeURI, uri, uri, uri));
+ assertTrue(strategy.handles(rangeIRI, uri, uri, null));
+ assertTrue(strategy.handles(rangeIRI, uri, uri, uri));
//p(ng)
assertTrue(strategy.handles(null, uri, null, null));
assertTrue(strategy.handles(null, uri, null, uri));
//p_r(o)(ng)
- assertTrue(strategy.handles(null, uri, rangeURI, null));
- assertTrue(strategy.handles(null, uri, rangeURI, uri));
+ assertTrue(strategy.handles(null, uri, rangeIRI, null));
+ assertTrue(strategy.handles(null, uri, rangeIRI, uri));
//r(p)(ng)
- assertFalse(strategy.handles(null, rangeURI, null, null));
- assertFalse(strategy.handles(null, rangeURI, null, uri));
+ assertFalse(strategy.handles(null, rangeIRI, null, null));
+ assertFalse(strategy.handles(null, rangeIRI, null, uri));
//false cases
//sp..
assertFalse(strategy.handles(uri, uri, null, null));
//r(s)_p
- assertFalse(strategy.handles(rangeURI, uri, null, null));
+ assertFalse(strategy.handles(rangeIRI, uri, null, null));
}
}
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java
index d71e4e8..763c0d1 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/HashedSpoWholeRowTriplePatternStrategyTest.java
@@ -26,8 +26,8 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
import org.apache.rya.api.domain.RyaTypeRange;
-import org.apache.rya.api.domain.RyaURI;
-import org.apache.rya.api.domain.RyaURIRange;
+import org.apache.rya.api.domain.RyaIRI;
+import org.apache.rya.api.domain.RyaIRIRange;
import org.apache.rya.api.query.strategy.ByteRange;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaTripleContext;
@@ -45,10 +45,10 @@
public class HashedSpoWholeRowTriplePatternStrategyTest extends TestCase {
private static final ValueFactory VF = SimpleValueFactory.getInstance();
- RyaURI uri = new RyaURI("urn:test#1234");
- RyaURI uri2 = new RyaURI("urn:test#1235");
- RyaURIRange rangeURI = new RyaURIRange(uri, uri2);
- RyaURIRange rangeURI2 = new RyaURIRange(new RyaURI("urn:test#1235"), new RyaURI("urn:test#1236"));
+ RyaIRI uri = new RyaIRI("urn:test#1234");
+ RyaIRI uri2 = new RyaIRI("urn:test#1235");
+ RyaIRIRange rangeIRI = new RyaIRIRange(uri, uri2);
+ RyaIRIRange rangeIRI2 = new RyaIRIRange(new RyaIRI("urn:test#1235"), new RyaIRI("urn:test#1236"));
HashedSpoWholeRowTriplePatternStrategy strategy = new HashedSpoWholeRowTriplePatternStrategy();
RyaContext ryaContext = RyaContext.getInstance();
RyaTripleContext ryaTripleContext;
@@ -110,10 +110,10 @@
new RyaStatement(uri, uri, uri, null));
TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO);
- Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(uri, uri, rangeURI, null, null);
+ Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(uri, uri, rangeIRI, null, null);
assertContains(entry.getValue(), tripleRow.getRow());
- entry = strategy.defineRange(uri, uri, rangeURI2, null, null);
+ entry = strategy.defineRange(uri, uri, rangeIRI2, null, null);
assertContainsFalse(entry.getValue(), tripleRow.getRow());
}
@@ -145,9 +145,9 @@
new RyaStatement(uri, uri, uri, null));
TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO);
- Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(uri, rangeURI, null, null, null);
+ Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(uri, rangeIRI, null, null, null);
assertContains(entry.getValue(), tripleRow.getRow());
- entry = strategy.defineRange(uri, rangeURI2, null, null, null);
+ entry = strategy.defineRange(uri, rangeIRI2, null, null, null);
assertContainsFalse(entry.getValue(), tripleRow.getRow());
}
@@ -165,7 +165,7 @@
public void testSRange() throws Exception {
- Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(rangeURI, null, null, null, null);
+ Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> entry = strategy.defineRange(rangeIRI, null, null, null, null);
assertNull(entry);
}
@@ -180,20 +180,20 @@
assertTrue(strategy.handles(uri, null, null, null));
assertTrue(strategy.handles(uri, null, null, uri));
//sp_r(o)(ng)
- assertTrue(strategy.handles(uri, uri, rangeURI, null));
- assertTrue(strategy.handles(uri, uri, rangeURI, uri));
+ assertTrue(strategy.handles(uri, uri, rangeIRI, null));
+ assertTrue(strategy.handles(uri, uri, rangeIRI, uri));
//s_r(p)(ng)
- assertTrue(strategy.handles(uri, rangeURI, null, null));
- assertTrue(strategy.handles(uri, rangeURI, null, uri));
+ assertTrue(strategy.handles(uri, rangeIRI, null, null));
+ assertTrue(strategy.handles(uri, rangeIRI, null, uri));
//fail
//s_r(p)_r(o)
- assertFalse(strategy.handles(uri, rangeURI, rangeURI, null));
+ assertFalse(strategy.handles(uri, rangeIRI, rangeIRI, null));
//s==null
assertFalse(strategy.handles(null, uri, uri, null));
//s_r(o)
- assertFalse(strategy.handles(uri, null, rangeURI, null));
+ assertFalse(strategy.handles(uri, null, rangeIRI, null));
}
}
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java
index 9bac95a..be607a8 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/NullRowTriplePatternStrategyTest.java
@@ -30,7 +30,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.query.strategy.ByteRange;
import org.junit.After;
import org.junit.AfterClass;
@@ -85,10 +85,10 @@
*/
@Test
public void testDefineRange() throws Exception {
- RyaURI subject = null;
- RyaURI predicate = null;
+ RyaIRI subject = null;
+ RyaIRI predicate = null;
RyaType object = null;
- RyaURI context = null;
+ RyaIRI context = null;
RdfCloudTripleStoreConfiguration conf = new MockRdfConfiguration();
NullRowTriplePatternStrategy instance = new NullRowTriplePatternStrategy();
Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, ByteRange> expResult = new RdfCloudTripleStoreUtils.CustomEntry<>(RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO, new ByteRange(new byte[]{}, LAST_BYTES));
@@ -103,14 +103,14 @@
*/
@Test
public void testHandles() {
- RyaURI subject = null;
- RyaURI predicate = null;
+ RyaIRI subject = null;
+ RyaIRI predicate = null;
RyaType object = null;
- RyaURI context = null;
+ RyaIRI context = null;
NullRowTriplePatternStrategy instance = new NullRowTriplePatternStrategy();
assertTrue(instance.handles(subject, predicate, object, context));
- RyaURI uri = new RyaURI("urn:test#1234");
+ RyaIRI uri = new RyaIRI("urn:test#1234");
assertFalse(instance.handles(uri, predicate, object, context));
assertFalse(instance.handles(subject, uri, object, context));
assertFalse(instance.handles(subject, predicate, uri, context));
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java
index a3a467d..e1e9dc6 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/OspWholeRowTriplePatternStrategyTest.java
@@ -40,10 +40,10 @@
//public class OspWholeRowTriplePatternStrategyTest extends TestCase {
// private static final ValueFactory VF = SimpleValueFactory.getInstance();
//
-// RyaURI uri = new RyaURI("urn:test#1234");
-// RyaURI uri2 = new RyaURI("urn:test#1235");
-// RyaURIRange rangeURI = new RyaURIRange(uri, uri2);
-// RyaURIRange rangeURI2 = new RyaURIRange(new RyaURI("urn:test#1235"), new RyaURI("urn:test#1236"));
+// RyaIRI uri = new RyaIRI("urn:test#1234");
+// RyaIRI uri2 = new RyaIRI("urn:test#1235");
+// RyaIRIRange rangeIRI = new RyaIRIRange(uri, uri2);
+// RyaIRIRange rangeIRI2 = new RyaIRIRange(new RyaIRI("urn:test#1235"), new RyaIRI("urn:test#1236"));
//
// RyaType customType1 = new RyaType(VF.createIRI("urn:custom#type"), "1234");
// RyaType customType2 = new RyaType(VF.createIRI("urn:custom#type"), "1235");
@@ -72,10 +72,10 @@
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP);
// Key key = new Key(new Text(tripleRow.getRow()));
//
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(null, null, rangeURI, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(null, null, rangeIRI, null, null);
// assertTrue(entry.getValue().contains(key));
//
-// entry = strategy.defineRange(null, null, rangeURI2, null, null);
+// entry = strategy.defineRange(null, null, rangeIRI2, null, null);
// assertFalse(entry.getValue().contains(key));
// }
//
@@ -98,10 +98,10 @@
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP);
// Key key = new Key(new Text(tripleRow.getRow()));
//
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(rangeURI, null, uri, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(rangeIRI, null, uri, null, null);
// assertTrue(entry.getValue().contains(key));
//
-// entry = strategy.defineRange(rangeURI2, null, uri, null, null);
+// entry = strategy.defineRange(rangeIRI2, null, uri, null, null);
// assertFalse(entry.getValue().contains(key));
// }
//
@@ -111,10 +111,10 @@
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP);
// Key key = new Key(new Text(tripleRow.getRow()));
//
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(rangeURI, null, customType1, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(rangeIRI, null, customType1, null, null);
// assertTrue(entry.getValue().contains(key));
//
-// entry = strategy.defineRange(rangeURI2, null, customType2, null, null);
+// entry = strategy.defineRange(rangeIRI2, null, customType2, null, null);
// assertFalse(entry.getValue().contains(key));
// }
//
@@ -123,16 +123,16 @@
// assertTrue(strategy.handles(uri, null, uri, null));
// assertTrue(strategy.handles(uri, null, uri, uri));
// //o_r(s)(ng)
-// assertTrue(strategy.handles(rangeURI, null, uri, null));
-// assertTrue(strategy.handles(rangeURI, null, uri, uri));
+// assertTrue(strategy.handles(rangeIRI, null, uri, null));
+// assertTrue(strategy.handles(rangeIRI, null, uri, uri));
// //o(ng)
// assertTrue(strategy.handles(null, null, uri, null));
// assertTrue(strategy.handles(null, null, uri, uri));
// //r(o)
-// assertTrue(strategy.handles(null, null, rangeURI, null));
-// assertTrue(strategy.handles(null, null, rangeURI, uri));
+// assertTrue(strategy.handles(null, null, rangeIRI, null));
+// assertTrue(strategy.handles(null, null, rangeIRI, uri));
//
// //false
-// assertFalse(strategy.handles(uri, null, rangeURI, null));
+// assertFalse(strategy.handles(uri, null, rangeIRI, null));
// }
//}
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java
index 7060457..6fe7540 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/PoWholeRowTriplePatternStrategyTest.java
@@ -40,10 +40,10 @@
//public class PoWholeRowTriplePatternStrategyTest extends TestCase {
// private static final ValueFactory VF = SimpleValueFactory.getInstance();
//
-// RyaURI uri = new RyaURI("urn:test#1234");
-// RyaURI uri2 = new RyaURI("urn:test#1235");
-// RyaURIRange rangeURI = new RyaURIRange(uri, uri2);
-// RyaURIRange rangeURI2 = new RyaURIRange(new RyaURI("urn:test#1235"), new RyaURI("urn:test#1236"));
+// RyaIRI uri = new RyaIRI("urn:test#1234");
+// RyaIRI uri2 = new RyaIRI("urn:test#1235");
+// RyaIRIRange rangeIRI = new RyaIRIRange(uri, uri2);
+// RyaIRIRange rangeIRI2 = new RyaIRIRange(new RyaIRI("urn:test#1235"), new RyaIRI("urn:test#1236"));
// PoWholeRowTriplePatternStrategy strategy = new PoWholeRowTriplePatternStrategy();
// RyaContext ryaContext = RyaContext.getInstance();
//
@@ -59,10 +59,10 @@
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.PO);
// Key key = new Key(new Text(tripleRow.getRow()));
//
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(null, uri, rangeURI, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(null, uri, rangeIRI, null, null);
// assertTrue(entry.getValue().contains(key));
//
-// entry = strategy.defineRange(null, uri, rangeURI2, null, null);
+// entry = strategy.defineRange(null, uri, rangeIRI2, null, null);
// assertFalse(entry.getValue().contains(key));
// }
//
@@ -111,15 +111,15 @@
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.PO);
// Key key = new Key(new Text(tripleRow.getRow()));
//
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(rangeURI, uri, uri, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(rangeIRI, uri, uri, null, null);
// assertTrue(entry.getValue().contains(key));
//
-// entry = strategy.defineRange(rangeURI2, uri, uri, null, null);
+// entry = strategy.defineRange(rangeIRI2, uri, uri, null, null);
// assertFalse(entry.getValue().contains(key));
// }
//
// public void testPRange() throws Exception {
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(null, rangeURI, null, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(null, rangeIRI, null, null, null);
// Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = ryaContext.serializeTriple(new RyaStatement(uri, uri, uri, null));
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.PO);
// Key key = new Key(new Text(tripleRow.getRow()));
@@ -140,22 +140,22 @@
// assertTrue(strategy.handles(null, uri, uri, null));
// assertTrue(strategy.handles(null, uri, uri, uri));
// //po_r(s)(ng)
-// assertTrue(strategy.handles(rangeURI, uri, uri, null));
-// assertTrue(strategy.handles(rangeURI, uri, uri, uri));
+// assertTrue(strategy.handles(rangeIRI, uri, uri, null));
+// assertTrue(strategy.handles(rangeIRI, uri, uri, uri));
// //p(ng)
// assertTrue(strategy.handles(null, uri, null, null));
// assertTrue(strategy.handles(null, uri, null, uri));
// //p_r(o)(ng)
-// assertTrue(strategy.handles(null, uri, rangeURI, null));
-// assertTrue(strategy.handles(null, uri, rangeURI, uri));
+// assertTrue(strategy.handles(null, uri, rangeIRI, null));
+// assertTrue(strategy.handles(null, uri, rangeIRI, uri));
// //r(p)(ng)
-// assertTrue(strategy.handles(null, rangeURI, null, null));
-// assertTrue(strategy.handles(null, rangeURI, null, uri));
+// assertTrue(strategy.handles(null, rangeIRI, null, null));
+// assertTrue(strategy.handles(null, rangeIRI, null, uri));
//
// //false cases
// //sp..
// assertFalse(strategy.handles(uri, uri, null, null));
// //r(s)_p
-// assertFalse(strategy.handles(rangeURI, uri, null, null));
+// assertFalse(strategy.handles(rangeIRI, uri, null, null));
// }
//}
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java
index 2c40053..9fb0793 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/query/strategy/wholerow/SpoWholeRowTriplePatternStrategyTest.java
@@ -40,10 +40,10 @@
//public class SpoWholeRowTriplePatternStrategyTest extends TestCase {
// private static final ValueFactory VF = SimpleValueFactory.getInstance();
//
-// RyaURI uri = new RyaURI("urn:test#1234");
-// RyaURI uri2 = new RyaURI("urn:test#1235");
-// RyaURIRange rangeURI = new RyaURIRange(uri, uri2);
-// RyaURIRange rangeURI2 = new RyaURIRange(new RyaURI("urn:test#1235"), new RyaURI("urn:test#1236"));
+// RyaIRI uri = new RyaIRI("urn:test#1234");
+// RyaIRI uri2 = new RyaIRI("urn:test#1235");
+// RyaIRIRange rangeIRI = new RyaIRIRange(uri, uri2);
+// RyaIRIRange rangeIRI2 = new RyaIRIRange(new RyaIRI("urn:test#1235"), new RyaIRI("urn:test#1236"));
// SpoWholeRowTriplePatternStrategy strategy = new SpoWholeRowTriplePatternStrategy();
// RyaContext ryaContext = RyaContext.getInstance();
//
@@ -85,10 +85,10 @@
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO);
// Key key = new Key(new Text(tripleRow.getRow()));
//
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(uri, uri, rangeURI, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(uri, uri, rangeIRI, null, null);
// assertTrue(entry.getValue().contains(key));
//
-// entry = strategy.defineRange(uri, uri, rangeURI2, null, null);
+// entry = strategy.defineRange(uri, uri, rangeIRI2, null, null);
// assertFalse(entry.getValue().contains(key));
// }
//
@@ -123,9 +123,9 @@
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO);
// Key key = new Key(new Text(tripleRow.getRow()));
//
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(uri, rangeURI, null, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(uri, rangeIRI, null, null, null);
// assertTrue(entry.getValue().contains(key));
-// entry = strategy.defineRange(uri, rangeURI2, null, null, null);
+// entry = strategy.defineRange(uri, rangeIRI2, null, null, null);
// assertFalse(entry.getValue().contains(key));
// }
//
@@ -148,10 +148,10 @@
// TripleRow tripleRow = serialize.get(RdfCloudTripleStoreConstants.TABLE_LAYOUT.SPO);
// Key key = new Key(new Text(tripleRow.getRow()));
//
-// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(rangeURI, null, null, null, null);
+// Map.Entry<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Range> entry = strategy.defineRange(rangeIRI, null, null, null, null);
// assertTrue(entry.getValue().contains(key));
//
-// entry = strategy.defineRange(rangeURI2, null, null, null, null);
+// entry = strategy.defineRange(rangeIRI2, null, null, null, null);
// assertFalse(entry.getValue().contains(key));
// }
//
@@ -166,22 +166,22 @@
// assertTrue(strategy.handles(uri, null, null, null));
// assertTrue(strategy.handles(uri, null, null, uri));
// //sp_r(o)(ng)
-// assertTrue(strategy.handles(uri, uri, rangeURI, null));
-// assertTrue(strategy.handles(uri, uri, rangeURI, uri));
+// assertTrue(strategy.handles(uri, uri, rangeIRI, null));
+// assertTrue(strategy.handles(uri, uri, rangeIRI, uri));
// //s_r(p)(ng)
-// assertTrue(strategy.handles(uri, rangeURI, null, null));
-// assertTrue(strategy.handles(uri, rangeURI, null, uri));
+// assertTrue(strategy.handles(uri, rangeIRI, null, null));
+// assertTrue(strategy.handles(uri, rangeIRI, null, uri));
// //r(s)
-// assertTrue(strategy.handles(rangeURI, null, null, null));
+// assertTrue(strategy.handles(rangeIRI, null, null, null));
//
// //fail
// //s_r(p)_r(o)
-// assertFalse(strategy.handles(uri, rangeURI, rangeURI, null));
+// assertFalse(strategy.handles(uri, rangeIRI, rangeIRI, null));
//
// //s==null
// assertFalse(strategy.handles(null, uri, uri, null));
//
// //s_r(o)
-// assertFalse(strategy.handles(uri, null, rangeURI, null));
+// assertFalse(strategy.handles(uri, null, rangeIRI, null));
// }
//}
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java
index ade343f..d4b5f5c 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/RyaContextTest.java
@@ -24,7 +24,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.query.strategy.wholerow.MockRdfConfiguration;
import org.apache.rya.api.resolver.triple.TripleRow;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
@@ -42,11 +42,11 @@
byte[] serialize = instance.serialize(ryaType);
assertEquals(ryaType, instance.deserialize(serialize));
- //uri
- RyaURI ryaURI = new RyaURI("urn:test#1234");
- serialize = instance.serialize(ryaURI);
+ //iri
+ RyaIRI ryaIRI = new RyaIRI("urn:test#1234");
+ serialize = instance.serialize(ryaIRI);
RyaType deserialize = instance.deserialize(serialize);
- assertEquals(ryaURI, deserialize);
+ assertEquals(ryaIRI, deserialize);
//custom type
ryaType = new RyaType(SimpleValueFactory.getInstance().createIRI("urn:test#customDataType"), "mydata");
@@ -55,8 +55,8 @@
}
public void testTripleRowSerialization() throws Exception {
- RyaURI subj = new RyaURI("urn:test#subj");
- RyaURI pred = new RyaURI("urn:test#pred");
+ RyaIRI subj = new RyaIRI("urn:test#subj");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
RyaType obj = new RyaType("mydata");
RyaStatement statement = new RyaStatement(subj, pred, obj);
RyaTripleContext instance = RyaTripleContext.getInstance(new MockRdfConfiguration());
@@ -67,8 +67,8 @@
}
public void testHashedTripleRowSerialization() throws Exception {
- RyaURI subj = new RyaURI("urn:test#subj");
- RyaURI pred = new RyaURI("urn:test#pred");
+ RyaIRI subj = new RyaIRI("urn:test#subj");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
RyaType obj = new RyaType("mydata");
RyaStatement statement = new RyaStatement(subj, pred, obj);
MockRdfConfiguration config = new MockRdfConfiguration();
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/RyaURIResolverTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/RyaIRIResolverTest.java
similarity index 76%
rename from common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/RyaURIResolverTest.java
rename to common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/RyaIRIResolverTest.java
index 811961a..40c58e0 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/RyaURIResolverTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/impl/RyaIRIResolverTest.java
@@ -23,18 +23,18 @@
import junit.framework.TestCase;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
/**
* Date: 7/16/12
* Time: 2:51 PM
*/
-public class RyaURIResolverTest extends TestCase {
+public class RyaIRIResolverTest extends TestCase {
public void testSerialization() throws Exception {
- RyaURI ryaURI = new RyaURI("urn:testdata#data");
- byte[] serialize = new RyaURIResolver().serialize(ryaURI);
- RyaType deserialize = new RyaURIResolver().deserialize(serialize);
- assertEquals(ryaURI, deserialize);
+ RyaIRI ryaIRI = new RyaIRI("urn:testdata#data");
+ byte[] serialize = new RyaIRIResolver().serialize(ryaIRI);
+ RyaType deserialize = new RyaIRIResolver().deserialize(serialize);
+ assertEquals(ryaIRI, deserialize);
}
}
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/triple/impl/HashedWholeRowTripleResolverTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/triple/impl/HashedWholeRowTripleResolverTest.java
index f57b5d1..2dcb362 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/triple/impl/HashedWholeRowTripleResolverTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/triple/impl/HashedWholeRowTripleResolverTest.java
@@ -26,7 +26,7 @@
import junit.framework.TestCase;
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.triple.TripleRow;
/**
@@ -39,10 +39,10 @@
public void testSerialize() throws Exception {
//no context
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
- RyaURI cntxt = new RyaURI("urn:test#cntxt");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
+ RyaIRI cntxt = new RyaIRI("urn:test#cntxt");
final RyaStatement stmt = new RyaStatement(subj, pred, obj, null, null, null, null, 100l);
final RyaStatement stmtContext = new RyaStatement(subj, pred, obj, cntxt, null, null, null, 100l);
@@ -61,10 +61,10 @@
public void testSerializePO() throws Exception {
RdfCloudTripleStoreConstants.TABLE_LAYOUT po = RdfCloudTripleStoreConstants.TABLE_LAYOUT.PO;
//no context
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
- RyaURI cntxt = new RyaURI("urn:test#cntxt");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
+ RyaIRI cntxt = new RyaIRI("urn:test#cntxt");
final RyaStatement stmt = new RyaStatement(subj, pred, obj, null, null, null, null, 100l);
final RyaStatement stmtContext = new RyaStatement(subj, pred, obj, cntxt, null, null, null, 100l);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = tripleResolver.serialize(stmt);
@@ -82,10 +82,10 @@
public void testSerializeOSP() throws Exception {
RdfCloudTripleStoreConstants.TABLE_LAYOUT po = RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP;
//no context
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
- RyaURI cntxt = new RyaURI("urn:test#cntxt");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
+ RyaIRI cntxt = new RyaIRI("urn:test#cntxt");
final RyaStatement stmt = new RyaStatement(subj, pred, obj, null, null, null, null, 100l);
final RyaStatement stmtContext = new RyaStatement(subj, pred, obj, cntxt, null, null, null, 100l);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = tripleResolver.serialize(stmt);
@@ -103,10 +103,10 @@
public void testSerializeOSPCustomType() throws Exception {
RdfCloudTripleStoreConstants.TABLE_LAYOUT po = RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP;
//no context
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
- RyaURI cntxt = new RyaURI("urn:test#cntxt");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
+ RyaIRI cntxt = new RyaIRI("urn:test#cntxt");
final RyaStatement stmt = new RyaStatement(subj, pred, obj, null, null, null, null, 100l);
final RyaStatement stmtContext = new RyaStatement(subj, pred, obj, cntxt, null, null, null, 100l);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = tripleResolver.serialize(stmt);
diff --git a/common/rya.api/src/test/java/org/apache/rya/api/resolver/triple/impl/WholeRowTripleResolverTest.java b/common/rya.api/src/test/java/org/apache/rya/api/resolver/triple/impl/WholeRowTripleResolverTest.java
index 9fd5260..a812068 100644
--- a/common/rya.api/src/test/java/org/apache/rya/api/resolver/triple/impl/WholeRowTripleResolverTest.java
+++ b/common/rya.api/src/test/java/org/apache/rya/api/resolver/triple/impl/WholeRowTripleResolverTest.java
@@ -24,7 +24,7 @@
import junit.framework.TestCase;
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.triple.TripleRow;
import org.apache.rya.api.resolver.triple.TripleRowRegex;
@@ -42,10 +42,10 @@
public void testSerialize() throws Exception {
//no context
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
- RyaURI cntxt = new RyaURI("urn:test#cntxt");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
+ RyaIRI cntxt = new RyaIRI("urn:test#cntxt");
final RyaStatement stmt = new RyaStatement(subj, pred, obj, null, null, null, null, 100l);
final RyaStatement stmtContext = new RyaStatement(subj, pred, obj, cntxt, null, null, null, 100l);
@@ -64,10 +64,10 @@
public void testSerializePO() throws Exception {
RdfCloudTripleStoreConstants.TABLE_LAYOUT po = RdfCloudTripleStoreConstants.TABLE_LAYOUT.PO;
//no context
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
- RyaURI cntxt = new RyaURI("urn:test#cntxt");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
+ RyaIRI cntxt = new RyaIRI("urn:test#cntxt");
final RyaStatement stmt = new RyaStatement(subj, pred, obj, null, null, null, null, 100l);
final RyaStatement stmtContext = new RyaStatement(subj, pred, obj, cntxt, null, null, null, 100l);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = tripleResolver.serialize(stmt);
@@ -85,10 +85,10 @@
public void testSerializeOSP() throws Exception {
RdfCloudTripleStoreConstants.TABLE_LAYOUT po = RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP;
//no context
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
- RyaURI cntxt = new RyaURI("urn:test#cntxt");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
+ RyaIRI cntxt = new RyaIRI("urn:test#cntxt");
final RyaStatement stmt = new RyaStatement(subj, pred, obj, null, null, null, null, 100l);
final RyaStatement stmtContext = new RyaStatement(subj, pred, obj, cntxt, null, null, null, 100l);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = tripleResolver.serialize(stmt);
@@ -106,10 +106,10 @@
public void testSerializeOSPCustomType() throws Exception {
RdfCloudTripleStoreConstants.TABLE_LAYOUT po = RdfCloudTripleStoreConstants.TABLE_LAYOUT.OSP;
//no context
- RyaURI subj = new RyaURI("urn:test#1234");
- RyaURI pred = new RyaURI("urn:test#pred");
- RyaURI obj = new RyaURI("urn:test#obj");
- RyaURI cntxt = new RyaURI("urn:test#cntxt");
+ RyaIRI subj = new RyaIRI("urn:test#1234");
+ RyaIRI pred = new RyaIRI("urn:test#pred");
+ RyaIRI obj = new RyaIRI("urn:test#obj");
+ RyaIRI cntxt = new RyaIRI("urn:test#cntxt");
final RyaStatement stmt = new RyaStatement(subj, pred, obj, null, null, null, null, 100l);
final RyaStatement stmtContext = new RyaStatement(subj, pred, obj, cntxt, null, null, null, 100l);
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, TripleRow> serialize = tripleResolver.serialize(stmt);
diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java
index f3e97a3..9b3752b 100644
--- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java
+++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/AccumuloRyaDAO.java
@@ -63,7 +63,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.layout.TableLayoutStrategy;
import org.apache.rya.api.persist.RyaDAO;
import org.apache.rya.api.persist.RyaDAOException;
@@ -215,7 +215,7 @@
}
@Override
- public void dropGraph(final AccumuloRdfConfiguration conf, final RyaURI... graphs) throws RyaDAOException {
+ public void dropGraph(final AccumuloRdfConfiguration conf, final RyaIRI... graphs) throws RyaDAOException {
BatchDeleter bd_spo = null;
BatchDeleter bd_po = null;
BatchDeleter bd_osp = null;
@@ -229,7 +229,7 @@
bd_po.setRanges(Collections.singleton(new Range()));
bd_osp.setRanges(Collections.singleton(new Range()));
- for (final RyaURI graph : graphs){
+ for (final RyaIRI graph : graphs){
bd_spo.fetchColumnFamily(new Text(graph.getData()));
bd_po.fetchColumnFamily(new Text(graph.getData()));
bd_osp.fetchColumnFamily(new Text(graph.getData()));
diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AbstractAccumuloIndexer.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AbstractAccumuloIndexer.java
index 90cae5e..6d6a13b 100644
--- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AbstractAccumuloIndexer.java
+++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/experimental/AbstractAccumuloIndexer.java
@@ -24,7 +24,7 @@
import java.util.Collection;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.accumulo.core.client.MultiTableBatchWriter;
@@ -46,7 +46,7 @@
}
@Override
- public void dropGraph(RyaURI... graphs) {
+ public void dropGraph(RyaIRI... graphs) {
}
@Override
diff --git a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java
index 8887739..b39f44f 100644
--- a/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java
+++ b/dao/accumulo.rya/src/main/java/org/apache/rya/accumulo/query/AccumuloRyaQueryEngine.java
@@ -48,7 +48,7 @@
import org.apache.rya.api.domain.RyaRange;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.layout.TableLayoutStrategy;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.BatchRyaQuery;
@@ -129,9 +129,9 @@
Collection<Range> ranges = new HashSet<Range>();
RangeBindingSetEntries rangeMap = new RangeBindingSetEntries();
TABLE_LAYOUT layout = null;
- RyaURI context = null;
+ RyaIRI context = null;
TriplePatternStrategy strategy = null;
- RyaURI columnFamily = null;
+ RyaIRI columnFamily = null;
boolean columnFamilySet = false;
for (Map.Entry<RyaStatement, BindingSet> stmtbs : stmts) {
RyaStatement stmt = stmtbs.getKey();
@@ -269,10 +269,10 @@
TriplePatternStrategy strategy = ryaContext.retrieveStrategy(stmt);
TABLE_LAYOUT layout;
Range range;
- RyaURI subject = stmt.getSubject();
- RyaURI predicate = stmt.getPredicate();
+ RyaIRI subject = stmt.getSubject();
+ RyaIRI predicate = stmt.getPredicate();
RyaType object = stmt.getObject();
- RyaURI context = stmt.getContext();
+ RyaIRI context = stmt.getContext();
String qualifier = stmt.getQualifer();
TripleRowRegex tripleRowRegex = null;
if (strategy != null) {
@@ -347,7 +347,7 @@
try {
Collection<Range> ranges = new HashSet<Range>();
TABLE_LAYOUT layout = null;
- RyaURI context = null;
+ RyaIRI context = null;
TriplePatternStrategy strategy = null;
for (RyaStatement stmt : stmts) {
context = stmt.getContext(); // TODO: This will be overwritten
@@ -382,7 +382,7 @@
results = FluentCloseableIterable.from(new ScannerBaseCloseableIterable(scanner))
.transform(keyValueToRyaStatementFunctionMap.get(layout));
} else {
- final RyaURI fcontext = context;
+ final RyaIRI fcontext = context;
final RdfCloudTripleStoreConfiguration fconf = ryaQuery.getConf();
FluentIterable<RyaStatement> fluent = FluentIterable.from(ranges)
.transformAndConcat(new Function<Range, Iterable<Map.Entry<Key, Value>>>() {
@@ -410,7 +410,7 @@
}
}
- protected void fillScanner(ScannerBase scanner, RyaURI context, String qualifier, Long ttl, Long currentTime,
+ protected void fillScanner(ScannerBase scanner, RyaIRI context, String qualifier, Long ttl, Long currentTime,
TripleRowRegex tripleRowRegex, RdfCloudTripleStoreConfiguration conf) throws IOException {
if (context != null && qualifier != null) {
scanner.fetchColumn(new Text(context.getData()), new Text(qualifier));
diff --git a/dao/accumulo.rya/src/test/java/org/apache/rya/accumulo/AccumuloRyaDAOTest.java b/dao/accumulo.rya/src/test/java/org/apache/rya/accumulo/AccumuloRyaDAOTest.java
index 75e5861..35d18ea 100644
--- a/dao/accumulo.rya/src/test/java/org/apache/rya/accumulo/AccumuloRyaDAOTest.java
+++ b/dao/accumulo.rya/src/test/java/org/apache/rya/accumulo/AccumuloRyaDAOTest.java
@@ -38,7 +38,7 @@
import org.apache.rya.accumulo.query.AccumuloRyaQueryEngine;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.RyaQuery;
@@ -84,9 +84,9 @@
@Test
public void testAdd() throws Exception {
- RyaURI cpu = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "cpu"));
- RyaURI loadPerc = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "loadPerc"));
- RyaURI uri1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "uri1"));
+ RyaIRI cpu = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "cpu"));
+ RyaIRI loadPerc = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "loadPerc"));
+ RyaIRI uri1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "uri1"));
dao.add(new RyaStatement(cpu, loadPerc, uri1));
CloseableIteration<RyaStatement, RyaDAOException> iter = dao.getQueryEngine().query(new RyaStatement(cpu, loadPerc, null), conf);
@@ -112,9 +112,9 @@
@Test
public void testDeleteDiffVisibility() throws Exception {
- RyaURI cpu = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "cpu"));
- RyaURI loadPerc = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "loadPerc"));
- RyaURI uri1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "uri1"));
+ RyaIRI cpu = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "cpu"));
+ RyaIRI loadPerc = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "loadPerc"));
+ RyaIRI uri1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "uri1"));
RyaStatement stmt1 = new RyaStatement(cpu, loadPerc, uri1, null, "1", new StatementMetadata(), "vis1".getBytes());
dao.add(stmt1);
RyaStatement stmt2 = new RyaStatement(cpu, loadPerc, uri1, null, "2", new StatementMetadata(), "vis2".getBytes());
@@ -146,9 +146,9 @@
@Test
public void testDeleteDiffTimestamp() throws Exception {
- RyaURI cpu = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "cpu"));
- RyaURI loadPerc = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "loadPerc"));
- RyaURI uri1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "uri1"));
+ RyaIRI cpu = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "cpu"));
+ RyaIRI loadPerc = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "loadPerc"));
+ RyaIRI uri1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "uri1"));
RyaStatement stmt1 = new RyaStatement(cpu, loadPerc, uri1, null, "1", null, null, 100l);
dao.add(stmt1);
RyaStatement stmt2 = new RyaStatement(cpu, loadPerc, uri1, null, "2", null, null, 100l);
@@ -170,14 +170,14 @@
@Test
public void testDelete() throws Exception {
- RyaURI predicate = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "pred"));
- RyaURI subj = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "subj"));
+ RyaIRI predicate = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "pred"));
+ RyaIRI subj = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "subj"));
// create a "bulk load" of 10,000 statements
int statement_count = 10000;
for (int i = 0 ; i < statement_count ; i++){
//make the statement very large so we will get a lot of random flushes
- RyaURI obj = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, String.format("object%050d",i)));
+ RyaIRI obj = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, String.format("object%050d",i)));
RyaStatement stmt = new RyaStatement(subj, predicate, obj);
dao.add(stmt);
}
@@ -208,8 +208,8 @@
@Test
public void testAddEmptyString() throws Exception {
- RyaURI cpu = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "cpu"));
- RyaURI loadPerc = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "loadPerc"));
+ RyaIRI cpu = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "cpu"));
+ RyaIRI loadPerc = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "loadPerc"));
RyaType empty = new RyaType("");
dao.add(new RyaStatement(cpu, loadPerc, empty));
@@ -222,13 +222,13 @@
@Test
public void testMaxResults() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri1")));
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri2")));
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri3")));
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri4")));
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri5")));
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri1")));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri2")));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri3")));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri4")));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri5")));
AccumuloRyaQueryEngine queryEngine = dao.getQueryEngine();
AccumuloRdfConfiguration queryConf = new AccumuloRdfConfiguration(conf);
@@ -247,9 +247,9 @@
@Test
public void testAddValue() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
- RyaURI uri1 = new RyaURI(litdupsNS + "uri1");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
+ RyaIRI uri1 = new RyaIRI(litdupsNS + "uri1");
String myval = "myval";
byte[] columnVis = null;
dao.add(new RyaStatement(cpu, loadPerc, uri1, null, null, columnVis, myval.getBytes()));
@@ -263,11 +263,11 @@
@Test
public void testAddCv() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
- RyaURI uri1 = new RyaURI(litdupsNS + "uri1");
- RyaURI uri2 = new RyaURI(litdupsNS + "uri2");
- RyaURI uri3 = new RyaURI(litdupsNS + "uri3");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
+ RyaIRI uri1 = new RyaIRI(litdupsNS + "uri1");
+ RyaIRI uri2 = new RyaIRI(litdupsNS + "uri2");
+ RyaIRI uri3 = new RyaIRI(litdupsNS + "uri3");
byte[] colVisABC = "A|B|C".getBytes();
byte[] colVisAB = "A|B".getBytes();
byte[] colVisA = "A".getBytes();
@@ -311,14 +311,14 @@
@Test
public void testTTL() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
long current = System.currentTimeMillis();
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri1"), null, null, null, null, current));
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri2"), null, null, null, null, current - 1010l));
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri3"), null, null, null, null, current - 2010l));
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri4"), null, null, null, null, current - 3010l));
- dao.add(new RyaStatement(cpu, loadPerc, new RyaURI(litdupsNS + "uri5"), null, null, null, null, current - 4010l));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri1"), null, null, null, null, current));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri2"), null, null, null, null, current - 1010l));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri3"), null, null, null, null, current - 2010l));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri4"), null, null, null, null, current - 3010l));
+ dao.add(new RyaStatement(cpu, loadPerc, new RyaIRI(litdupsNS + "uri5"), null, null, null, null, current - 4010l));
AccumuloRyaQueryEngine queryEngine = dao.getQueryEngine();
AccumuloRdfConfiguration queryConf = conf.clone();
@@ -355,14 +355,14 @@
//TOOD: Add test for set of queries
@Test
public void testQuery() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
- RyaURI uri1 = new RyaURI(litdupsNS + "uri1");
- RyaURI uri2 = new RyaURI(litdupsNS + "uri2");
- RyaURI uri3 = new RyaURI(litdupsNS + "uri3");
- RyaURI uri4 = new RyaURI(litdupsNS + "uri4");
- RyaURI uri5 = new RyaURI(litdupsNS + "uri5");
- RyaURI uri6 = new RyaURI(litdupsNS + "uri6");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
+ RyaIRI uri1 = new RyaIRI(litdupsNS + "uri1");
+ RyaIRI uri2 = new RyaIRI(litdupsNS + "uri2");
+ RyaIRI uri3 = new RyaIRI(litdupsNS + "uri3");
+ RyaIRI uri4 = new RyaIRI(litdupsNS + "uri4");
+ RyaIRI uri5 = new RyaIRI(litdupsNS + "uri5");
+ RyaIRI uri6 = new RyaIRI(litdupsNS + "uri6");
dao.add(new RyaStatement(cpu, loadPerc, uri1));
dao.add(new RyaStatement(cpu, loadPerc, uri2));
dao.add(new RyaStatement(cpu, loadPerc, uri3));
@@ -409,8 +409,8 @@
@Test
public void testQueryDates() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
RyaType uri0 = new RyaType(XMLSchema.DATETIME, "1960-01-01"); // How handles local time
RyaType uri1 = new RyaType(XMLSchema.DATETIME, "1992-01-01T+10:00"); // See Magadan Time
RyaType uri2 = new RyaType(XMLSchema.DATETIME, "2000-01-01TZ"); // How it handles UTC.
@@ -475,14 +475,14 @@
@Test
public void testQueryCollectionRegex() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
- RyaURI uri1 = new RyaURI(litdupsNS + "uri1");
- RyaURI uri2 = new RyaURI(litdupsNS + "uri2");
- RyaURI uri3 = new RyaURI(litdupsNS + "uri3");
- RyaURI uri4 = new RyaURI(litdupsNS + "uri4");
- RyaURI uri5 = new RyaURI(litdupsNS + "uri5");
- RyaURI uri6 = new RyaURI(litdupsNS + "uri6");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
+ RyaIRI uri1 = new RyaIRI(litdupsNS + "uri1");
+ RyaIRI uri2 = new RyaIRI(litdupsNS + "uri2");
+ RyaIRI uri3 = new RyaIRI(litdupsNS + "uri3");
+ RyaIRI uri4 = new RyaIRI(litdupsNS + "uri4");
+ RyaIRI uri5 = new RyaIRI(litdupsNS + "uri5");
+ RyaIRI uri6 = new RyaIRI(litdupsNS + "uri6");
dao.add(new RyaStatement(cpu, loadPerc, uri1));
dao.add(new RyaStatement(cpu, loadPerc, uri2));
dao.add(new RyaStatement(cpu, loadPerc, uri3));
@@ -518,14 +518,14 @@
@Test
public void testQueryCollectionRegexWBatchScanner() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
- RyaURI uri1 = new RyaURI(litdupsNS + "uri1");
- RyaURI uri2 = new RyaURI(litdupsNS + "uri2");
- RyaURI uri3 = new RyaURI(litdupsNS + "uri3");
- RyaURI uri4 = new RyaURI(litdupsNS + "uri4");
- RyaURI uri5 = new RyaURI(litdupsNS + "uri5");
- RyaURI uri6 = new RyaURI(litdupsNS + "uri6");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
+ RyaIRI uri1 = new RyaIRI(litdupsNS + "uri1");
+ RyaIRI uri2 = new RyaIRI(litdupsNS + "uri2");
+ RyaIRI uri3 = new RyaIRI(litdupsNS + "uri3");
+ RyaIRI uri4 = new RyaIRI(litdupsNS + "uri4");
+ RyaIRI uri5 = new RyaIRI(litdupsNS + "uri5");
+ RyaIRI uri6 = new RyaIRI(litdupsNS + "uri6");
dao.add(new RyaStatement(cpu, loadPerc, uri1));
dao.add(new RyaStatement(cpu, loadPerc, uri2));
dao.add(new RyaStatement(cpu, loadPerc, uri3));
@@ -563,8 +563,8 @@
@Test
public void testLiteralTypes() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
RyaType longLit = new RyaType(XMLSchema.LONG, "3");
dao.add(new RyaStatement(cpu, loadPerc, longLit));
@@ -590,8 +590,8 @@
@Test
public void testSameLiteralStringTypes() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
RyaType longLit = new RyaType(XMLSchema.LONG, "10");
RyaType strLit = new RyaType(XMLSchema.STRING, new String(RyaContext.getInstance().serializeType(longLit)[0]));
@@ -641,9 +641,9 @@
@Test
public void testQueryWithIterators() throws Exception {
- RyaURI cpu = new RyaURI(litdupsNS + "cpu");
- RyaURI loadPerc = new RyaURI(litdupsNS + "loadPerc");
- RyaURI uri1 = new RyaURI(litdupsNS + "uri1");
+ RyaIRI cpu = new RyaIRI(litdupsNS + "cpu");
+ RyaIRI loadPerc = new RyaIRI(litdupsNS + "loadPerc");
+ RyaIRI uri1 = new RyaIRI(litdupsNS + "uri1");
dao.add(new RyaStatement(cpu, loadPerc, uri1, null, "qual1"));
dao.add(new RyaStatement(cpu, loadPerc, uri1, null, "qual2"));
@@ -699,8 +699,8 @@
}
private RyaStatement newRyaStatement() {
- RyaURI subject = new RyaURI(litdupsNS + randomString());
- RyaURI predicate = new RyaURI(litdupsNS + randomString());
+ RyaIRI subject = new RyaIRI(litdupsNS + randomString());
+ RyaIRI predicate = new RyaIRI(litdupsNS + randomString());
RyaType object = new RyaType(randomString());
return new RyaStatement(subject, predicate, object);
diff --git a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java
index d01c2d7..ab153b3 100644
--- a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java
+++ b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MongoDBRyaDAO.java
@@ -31,7 +31,7 @@
import org.apache.log4j.Logger;
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAO;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.RyaNamespaceManager;
@@ -237,7 +237,7 @@
}
@Override
- public void dropGraph(final StatefulMongoDBRdfConfiguration conf, final RyaURI... graphs)
+ public void dropGraph(final StatefulMongoDBRdfConfiguration conf, final RyaIRI... graphs)
throws RyaDAOException {
}
diff --git a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/aggregation/AggregationPipelineQueryNode.java b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/aggregation/AggregationPipelineQueryNode.java
index 769d2de..35525ad 100644
--- a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/aggregation/AggregationPipelineQueryNode.java
+++ b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/aggregation/AggregationPipelineQueryNode.java
@@ -44,7 +44,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.mongodb.MongoDbRdfConstants;
@@ -256,21 +256,21 @@
final Var predVar = sp.getPredicateVar();
final Var objVar = sp.getObjectVar();
final Var contextVar = sp.getContextVar();
- RyaURI s = null;
- RyaURI p = null;
+ RyaIRI s = null;
+ RyaIRI p = null;
RyaType o = null;
- RyaURI c = null;
+ RyaIRI c = null;
if (subjVar != null && subjVar.getValue() instanceof Resource) {
s = RdfToRyaConversions.convertResource((Resource) subjVar.getValue());
}
if (predVar != null && predVar.getValue() instanceof IRI) {
- p = RdfToRyaConversions.convertURI((IRI) predVar.getValue());
+ p = RdfToRyaConversions.convertIRI((IRI) predVar.getValue());
}
if (objVar != null && objVar.getValue() != null) {
o = RdfToRyaConversions.convertValue(objVar.getValue());
}
if (contextVar != null && contextVar.getValue() instanceof IRI) {
- c = RdfToRyaConversions.convertURI((IRI) contextVar.getValue());
+ c = RdfToRyaConversions.convertIRI((IRI) contextVar.getValue());
}
RyaStatement rs = new RyaStatement(s, p, o, c);
DBObject obj = strategy.getQuery(rs);
diff --git a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/dao/SimpleMongoDBStorageStrategy.java b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/dao/SimpleMongoDBStorageStrategy.java
index b2490bc..ec5c7a5 100644
--- a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/dao/SimpleMongoDBStorageStrategy.java
+++ b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/dao/SimpleMongoDBStorageStrategy.java
@@ -30,7 +30,7 @@
import org.apache.log4j.Logger;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.query.RyaQuery;
import org.apache.rya.mongodb.document.visibility.DocumentVisibility;
@@ -94,10 +94,10 @@
@Override
public DBObject getQuery(final RyaStatement stmt) {
- final RyaURI subject = stmt.getSubject();
- final RyaURI predicate = stmt.getPredicate();
+ final RyaIRI subject = stmt.getSubject();
+ final RyaIRI predicate = stmt.getPredicate();
final RyaType object = stmt.getObject();
- final RyaURI context = stmt.getContext();
+ final RyaIRI context = stmt.getContext();
final BasicDBObject query = new BasicDBObject();
if (subject != null){
query.append(SUBJECT_HASH, hash(subject.getData()));
@@ -133,7 +133,7 @@
final String statementMetadata = (String) result.get(STATEMENT_METADATA);
RyaType objectRya = null;
if (objectType.equalsIgnoreCase(ANYURI.stringValue())){
- objectRya = new RyaURI(object);
+ objectRya = new RyaIRI(object);
}
else {
objectRya = new RyaType(factory.createIRI(objectType), object);
@@ -141,10 +141,10 @@
final RyaStatement statement;
if (!context.isEmpty()){
- statement = new RyaStatement(new RyaURI(subject), new RyaURI(predicate), objectRya,
- new RyaURI(context));
+ statement = new RyaStatement(new RyaIRI(subject), new RyaIRI(predicate), objectRya,
+ new RyaIRI(context));
} else {
- statement = new RyaStatement(new RyaURI(subject), new RyaURI(predicate), objectRya);
+ statement = new RyaStatement(new RyaIRI(subject), new RyaIRI(predicate), objectRya);
}
statement.setColumnVisibility(documentVisibility.flatten());
diff --git a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBQueryEngineIT.java b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBQueryEngineIT.java
index 4aef8cd..ead87d2 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBQueryEngineIT.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBQueryEngineIT.java
@@ -27,7 +27,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
@@ -46,13 +46,13 @@
private RyaStatement getStatement(final String s, final String p, final String o) {
final RyaStatementBuilder builder = new RyaStatementBuilder();
if (s != null) {
- builder.setSubject(new RyaURI(s));
+ builder.setSubject(new RyaIRI(s));
}
if (p != null) {
- builder.setPredicate(new RyaURI(p));
+ builder.setPredicate(new RyaIRI(p));
}
if (o != null) {
- builder.setObject(new RyaURI(o));
+ builder.setObject(new RyaIRI(o));
}
return builder.build();
}
diff --git a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaBatchWriterIT.java b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaBatchWriterIT.java
index d024cc4..4ce1348 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaBatchWriterIT.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaBatchWriterIT.java
@@ -26,7 +26,7 @@
import org.apache.log4j.BasicConfigurator;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.mongodb.batch.MongoDbBatchWriter;
import org.apache.rya.mongodb.batch.MongoDbBatchWriterConfig;
import org.apache.rya.mongodb.batch.MongoDbBatchWriterUtils;
@@ -156,15 +156,15 @@
return document;
}
- private static RyaURI ryaURI(final int v) {
- return new RyaURI("u:" + v);
+ private static RyaIRI ryaIRI(final int v) {
+ return new RyaIRI("u:" + v);
}
private static RyaStatement statement(final int v) {
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(ryaURI(v));
- builder.setSubject(ryaURI(v));
- builder.setObject(ryaURI(v));
+ builder.setPredicate(ryaIRI(v));
+ builder.setSubject(ryaIRI(v));
+ builder.setObject(ryaIRI(v));
return builder.build();
}
}
diff --git a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java
index 67002d7..25bf844 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAO2IT.java
@@ -27,7 +27,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.mongodb.document.visibility.DocumentVisibility;
import org.bson.Document;
@@ -50,7 +50,7 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
dao.delete(builder.build(), conf);
} finally {
dao.destroy();
@@ -66,9 +66,9 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
final MongoCollection<Document> coll = db.getCollection(conf.getTriplesCollectionName());
@@ -89,9 +89,9 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
final RyaStatement statement = builder.build();
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
@@ -115,10 +115,10 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
- builder.setContext(new RyaURI("http://context.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
+ builder.setContext(new RyaIRI("http://context.com"));
final RyaStatement statement = builder.build();
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
@@ -128,9 +128,9 @@
assertEquals(coll.count(),1);
final RyaStatementBuilder builder2 = new RyaStatementBuilder();
- builder2.setPredicate(new RyaURI("http://temp.com"));
- builder2.setObject(new RyaURI("http://object.com"));
- builder2.setContext(new RyaURI("http://context3.com"));
+ builder2.setPredicate(new RyaIRI("http://temp.com"));
+ builder2.setObject(new RyaIRI("http://object.com"));
+ builder2.setContext(new RyaIRI("http://context3.com"));
final RyaStatement query = builder2.build();
dao.delete(query, conf);
@@ -148,9 +148,9 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
builder.setColumnVisibility(new DocumentVisibility("B").flatten());
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
@@ -181,9 +181,9 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
builder.setColumnVisibility(new DocumentVisibility("B").flatten());
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
diff --git a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java
index c5ff223..939eff3 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoDBRyaDAOIT.java
@@ -29,7 +29,7 @@
import org.apache.accumulo.core.security.Authorizations;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.RyaQuery;
import org.apache.rya.mongodb.document.util.AuthorizationsUtil;
@@ -57,7 +57,7 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
builder.setColumnVisibility(new DocumentVisibility("A").flatten());
dao.delete(builder.build(), conf);
} finally {
@@ -73,9 +73,9 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
builder.setColumnVisibility(new DocumentVisibility("B").flatten());
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
@@ -101,9 +101,9 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
builder.setColumnVisibility(new DocumentVisibility("C").flatten());
final RyaStatement statement = builder.build();
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
@@ -127,10 +127,10 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
- builder.setContext(new RyaURI("http://context.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
+ builder.setContext(new RyaIRI("http://context.com"));
builder.setColumnVisibility(new DocumentVisibility("A&B&C").flatten());
final RyaStatement statement = builder.build();
@@ -141,9 +141,9 @@
assertEquals(1, coll.count());
final RyaStatementBuilder builder2 = new RyaStatementBuilder();
- builder2.setPredicate(new RyaURI("http://temp.com"));
- builder2.setObject(new RyaURI("http://object.com"));
- builder2.setContext(new RyaURI("http://context3.com"));
+ builder2.setPredicate(new RyaIRI("http://temp.com"));
+ builder2.setObject(new RyaIRI("http://object.com"));
+ builder2.setContext(new RyaIRI("http://context3.com"));
final RyaStatement query = builder2.build();
dao.delete(query, conf);
@@ -161,9 +161,9 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
builder.setColumnVisibility(new DocumentVisibility("B").flatten());
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
@@ -194,9 +194,9 @@
dao.init();
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
builder.setColumnVisibility(new DocumentVisibility("B").flatten());
final MongoDatabase db = conf.getMongoClient().getDatabase(conf.get(MongoDBRdfConfiguration.MONGO_DB_NAME));
@@ -621,10 +621,10 @@
private static RyaStatement buildVisibilityTestRyaStatement(final String documentVisibility) {
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI("http://temp.com"));
- builder.setSubject(new RyaURI("http://subject.com"));
- builder.setObject(new RyaURI("http://object.com"));
- builder.setContext(new RyaURI("http://context.com"));
+ builder.setPredicate(new RyaIRI("http://temp.com"));
+ builder.setSubject(new RyaIRI("http://subject.com"));
+ builder.setObject(new RyaIRI("http://object.com"));
+ builder.setContext(new RyaIRI("http://context.com"));
builder.setColumnVisibility(documentVisibility != null ? documentVisibility.getBytes() : null);
final RyaStatement statement = builder.build();
return statement;
diff --git a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/SimpleMongoDBStorageStrategyTest.java b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/SimpleMongoDBStorageStrategyTest.java
index 9f61dfd..576610c 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/SimpleMongoDBStorageStrategyTest.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/SimpleMongoDBStorageStrategyTest.java
@@ -26,7 +26,7 @@
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.mongodb.dao.SimpleMongoDBStorageStrategy;
import org.apache.rya.mongodb.document.util.DocumentVisibilityConversionException;
@@ -52,10 +52,10 @@
static {
final RyaStatementBuilder builder = new RyaStatementBuilder();
- builder.setPredicate(new RyaURI(PREDICATE));
- builder.setSubject(new RyaURI(SUBJECT));
- builder.setObject(new RyaURI(OBJECT));
- builder.setContext(new RyaURI(CONTEXT));
+ builder.setPredicate(new RyaIRI(PREDICATE));
+ builder.setSubject(new RyaIRI(SUBJECT));
+ builder.setObject(new RyaIRI(OBJECT));
+ builder.setContext(new RyaIRI(CONTEXT));
builder.setColumnVisibility(DOCUMENT_VISIBILITY.flatten());
builder.setTimestamp(null);
testStatement = builder.build();
diff --git a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/aggregation/PipelineQueryIT.java b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/aggregation/PipelineQueryIT.java
index 8dbf4b5..cd3c513 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/aggregation/PipelineQueryIT.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/aggregation/PipelineQueryIT.java
@@ -85,7 +85,7 @@
private void insert(Resource subject, IRI predicate, Value object, int derivationLevel) throws RyaDAOException {
final RyaStatementBuilder builder = new RyaStatementBuilder();
builder.setSubject(RdfToRyaConversions.convertResource(subject));
- builder.setPredicate(RdfToRyaConversions.convertURI(predicate));
+ builder.setPredicate(RdfToRyaConversions.convertIRI(predicate));
builder.setObject(RdfToRyaConversions.convertValue(object));
final RyaStatement rstmt = builder.build();
if (derivationLevel > 0) {
diff --git a/extras/indexing/README.md b/extras/indexing/README.md
index a2f7497..6ee6dd2 100644
--- a/extras/indexing/README.md
+++ b/extras/indexing/README.md
@@ -46,10 +46,10 @@
an Entity by doing the following:
```
final Entity entity = Entity.builder()
- .setSubject(new RyaURI("urn:GTIN-14/00012345600012"))
- .setExplicitType(new RyaURI("urn:icecream"))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
+ .setSubject(new RyaIRI("urn:GTIN-14/00012345600012"))
+ .setExplicitType(new RyaIRI("urn:icecream"))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
.build();
```
The two types of Entities that may be created are implicit and explicit.
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/AccumuloIndexingConfiguration.java b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/AccumuloIndexingConfiguration.java
index e6deab7..4b703eb 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/AccumuloIndexingConfiguration.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/AccumuloIndexingConfiguration.java
@@ -27,7 +27,7 @@
import org.apache.rya.accumulo.AbstractAccumuloRdfConfigurationBuilder;
import org.apache.rya.accumulo.AccumuloRdfConfiguration;
import org.apache.rya.accumulo.AccumuloRdfConfigurationBuilder;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.accumulo.entity.EntityCentricIndex;
import org.apache.rya.indexing.accumulo.freetext.AccumuloFreeTextIndexer;
import org.apache.rya.indexing.accumulo.temporal.AccumuloTemporalIndexer;
@@ -287,12 +287,12 @@
return getStrings(ConfigUtils.TEMPORAL_PREDICATES_LIST);
}
- private static Set<RyaURI> getPropURIFromStrings(final String... props) {
- final Set<RyaURI> properties = new HashSet<>();
+ private static Set<RyaIRI> getPropURIFromStrings(final String... props) {
+ final Set<RyaIRI> properties = new HashSet<>();
if (props != null) {
for(final String prop : props) {
if (StringUtils.isNotBlank(prop)) {
- properties.add(new RyaURI(prop));
+ properties.add(new RyaIRI(prop));
}
}
}
@@ -320,7 +320,7 @@
private boolean usePcj = false;
private boolean useOptimalPcj = false;
private String[] pcjs = new String[0];
- private Set<RyaURI> metadataProps = new HashSet<>();
+ private Set<RyaIRI> metadataProps = new HashSet<>();
private static final String USE_FREETEXT = "use.freetext";
private static final String USE_TEMPORAL = "use.temporal";
@@ -587,7 +587,7 @@
* @param useMetadata
* @return AccumuloIndexingConfigBuilder for chaining method invocations
*/
- public AccumuloIndexingConfigBuilder setStatementMetadataProperties(final Set<RyaURI> metadataProps) {
+ public AccumuloIndexingConfigBuilder setStatementMetadataProperties(final Set<RyaIRI> metadataProps) {
this.metadataProps = metadataProps;
return this;
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/AccumuloDocIdIndexer.java b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/AccumuloDocIdIndexer.java
index 1b20514..8deda36 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/AccumuloDocIdIndexer.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/AccumuloDocIdIndexer.java
@@ -48,7 +48,7 @@
import org.apache.rya.accumulo.documentIndex.DocIndexIteratorUtil;
import org.apache.rya.accumulo.documentIndex.DocumentIndexIntersectingIterator;
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.api.resolver.RyaTypeResolverException;
@@ -341,9 +341,9 @@
}
if (!commonVarSet && sq.isCommonVarURI()) {
- final RyaURI rURI = new RyaURI(row.toString());
+ final RyaIRI rIRI = new RyaIRI(row.toString());
currentSolutionBs.addBinding(sq.getCommonVarName(),
- RyaToRdfConversions.convertValue(rURI));
+ RyaToRdfConversions.convertValue(rIRI));
commonVarSet = true;
}
@@ -381,8 +381,8 @@
currentSolutionBs.addBinding(sq.getCommonVarName(), v);
commonVarSet = true;
}
- final RyaURI rURI = new RyaURI(new String(cqContent, StandardCharsets.UTF_8));
- currentSolutionBs.addBinding(s, RyaToRdfConversions.convertValue(rURI));
+ final RyaIRI rIRI = new RyaIRI(new String(cqContent, StandardCharsets.UTF_8));
+ currentSolutionBs.addBinding(s, RyaToRdfConversions.convertValue(rIRI));
} else {
throw new IllegalArgumentException("Invalid row.");
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/EntityCentricIndex.java b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/EntityCentricIndex.java
index 300d8ba..cad6a6c 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/EntityCentricIndex.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/EntityCentricIndex.java
@@ -53,7 +53,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaTypeResolverException;
import org.apache.rya.api.resolver.triple.TripleRow;
@@ -231,10 +231,10 @@
}
private static List<TripleRow> serializeStatement(final RyaStatement stmt) throws RyaTypeResolverException {
- final RyaURI subject = stmt.getSubject();
- final RyaURI predicate = stmt.getPredicate();
+ final RyaIRI subject = stmt.getSubject();
+ final RyaIRI predicate = stmt.getPredicate();
final RyaType object = stmt.getObject();
- final RyaURI context = stmt.getContext();
+ final RyaIRI context = stmt.getContext();
final Long timestamp = stmt.getTimestamp();
final byte[] columnVisibility = stmt.getColumnVisibility();
final byte[] value = stmt.getValue();
@@ -292,19 +292,19 @@
final byte[] otherNodeData = Arrays.copyOf(otherNodeBytes, split);
final byte[] typeBytes = Arrays.copyOfRange(otherNodeBytes, split, otherNodeBytes.length);
byte[] objectBytes;
- RyaURI subject;
- final RyaURI predicate = new RyaURI(new String(predicateBytes, StandardCharsets.UTF_8));
+ RyaIRI subject;
+ final RyaIRI predicate = new RyaIRI(new String(predicateBytes, StandardCharsets.UTF_8));
RyaType object;
- RyaURI context = null;
+ RyaIRI context = null;
// Expect either: entity=subject.data, otherNodeVar="object", otherNodeBytes={object.data, object.datatype}
// or: entity=object.data, otherNodeVar="subject", otherNodeBytes={subject.data, object.datatype}
switch (otherNodeVar) {
case SUBJECT:
- subject = new RyaURI(new String(otherNodeData, StandardCharsets.UTF_8));
+ subject = new RyaIRI(new String(otherNodeData, StandardCharsets.UTF_8));
objectBytes = Bytes.concat(entityBytes, typeBytes);
break;
case OBJECT:
- subject = new RyaURI(new String(entityBytes, StandardCharsets.UTF_8));
+ subject = new RyaIRI(new String(entityBytes, StandardCharsets.UTF_8));
objectBytes = Bytes.concat(otherNodeData, typeBytes);
break;
default:
@@ -313,7 +313,7 @@
}
object = RyaContext.getInstance().deserialize(objectBytes);
if (columnFamily != null && columnFamily.length > 0) {
- context = new RyaURI(new String(columnFamily, StandardCharsets.UTF_8));
+ context = new RyaIRI(new String(columnFamily, StandardCharsets.UTF_8));
}
return new RyaStatement(subject, predicate, object, context,
null, columnVisibility, valueBytes, timestamp);
@@ -343,7 +343,7 @@
split = Bytes.indexOf(otherNodeBytes, TYPE_DELIM_BYTES);
final byte[] typeBytes = Arrays.copyOfRange(otherNodeBytes, split, otherNodeBytes.length);
byte[] objectBytes;
- RyaURI subject;
+ RyaIRI subject;
RyaType object;
RyaType type = null;
switch (otherNodeVar) {
@@ -353,7 +353,7 @@
type = object;
break;
case OBJECT:
- subject = new RyaURI(new String(entityBytes, StandardCharsets.UTF_8));
+ subject = new RyaIRI(new String(entityBytes, StandardCharsets.UTF_8));
type = subject;
break;
default:
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/StarQuery.java b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/StarQuery.java
index fc1b15e..c4b9aeb 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/StarQuery.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/entity/StarQuery.java
@@ -28,7 +28,7 @@
import org.apache.hadoop.io.Text;
import org.apache.rya.accumulo.documentIndex.TextColumn;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.VarNameUtils;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaContext;
@@ -336,7 +336,7 @@
final String[] cqArray = cq.split("\u0000");
if (cqArray[0].equals("subject")) {
- // RyaURI subjURI = (RyaURI) RdfToRyaConversions.convertValue(v);
+ // RyaIRI subjIRI = (RyaIRI) RdfToRyaConversions.convertValue(v);
tc.setColumnQualifier(new Text("subject" + "\u0000" + v.stringValue()));
tc.setIsPrefix(false);
} else if (cqArray[0].equals("object")) {
@@ -366,7 +366,7 @@
final Var predVar = node.getPredicateVar();
final Var objVar = node.getObjectVar();
- final RyaURI predURI = (RyaURI) RdfToRyaConversions.convertValue(node.getPredicateVar().getValue());
+ final RyaIRI predURI = (RyaIRI) RdfToRyaConversions.convertValue(node.getPredicateVar().getValue());
//assumes StatementPattern contains at least on variable
@@ -436,7 +436,7 @@
}
if(hasContext()) {
- final RyaURI ctxtURI = (RyaURI) RdfToRyaConversions.convertValue(context.getValue());
+ final RyaIRI ctxtURI = (RyaIRI) RdfToRyaConversions.convertValue(context.getValue());
contextURI = ctxtURI.getData();
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/freetext/FreeTextTupleSet.java b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/freetext/FreeTextTupleSet.java
index e98cccb..b46c9b0 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/freetext/FreeTextTupleSet.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/accumulo/freetext/FreeTextTupleSet.java
@@ -125,7 +125,7 @@
throws QueryEvaluationException {
- IRI funcURI = filterInfo.getFunction();
+ IRI funcIRI = filterInfo.getFunction();
SearchFunction searchFunction = new SearchFunction() {
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/EntityIndexSetProvider.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/EntityIndexSetProvider.java
index e52b92b..d6f1771 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/EntityIndexSetProvider.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/EntityIndexSetProvider.java
@@ -27,7 +27,7 @@
import java.util.Map;
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Type;
import org.apache.rya.indexing.entity.query.EntityQueryNode;
@@ -72,9 +72,9 @@
return pattern.getSubjectVar();
}
- private RyaURI getPredURI(final StatementPattern pattern) {
+ private RyaIRI getPredIRI(final StatementPattern pattern) {
final Var pred = pattern.getPredicateVar();
- return new RyaURI(pred.getValue().stringValue());
+ return new RyaIRI(pred.getValue().stringValue());
}
@Override
@@ -102,11 +102,11 @@
private void discoverEntities(final StatementPattern pattern, final List<StatementPattern> unmatched) {
final Var subj = pattern.getSubjectVar();
final String subjStr = subj.getName();
- final RyaURI predURI = getPredURI(pattern);
+ final RyaIRI predIRI = getPredIRI(pattern);
//check to see if current node is type
- if(VF.createIRI(predURI.getData()).equals(RDF.TYPE)) {
+ if(VF.createIRI(predIRI.getData()).equals(RDF.TYPE)) {
final Var obj = pattern.getObjectVar();
- final RyaURI objURI = new RyaURI(obj.getValue().stringValue());
+ final RyaIRI objURI = new RyaIRI(obj.getValue().stringValue());
try {
final Optional<Type> optType = typeStorage.get(objURI);
//if is type, fetch type add to subject -> type map
@@ -117,7 +117,7 @@
//check unmatched properties, add matches
for(final StatementPattern propertyPattern : unmatched) {
//store sps into the type -> property map
- final RyaURI property = getPredURI(propertyPattern);
+ final RyaIRI property = getPredIRI(propertyPattern);
final Var typeSubVar = getTypeSubject(type);
final Var patternSubVar = propertyPattern.getSubjectVar();
if (type.getPropertyNames().contains(property) && typeSubVar.equals(patternSubVar)) {
@@ -133,7 +133,7 @@
if(subjectTypeMap.containsKey(subjStr)) {
//if is, check to see if pred is a property of type
final Type type = subjectTypeMap.get(subjStr);
- if(type.getPropertyNames().contains(predURI)) {
+ if(type.getPropertyNames().contains(predIRI)) {
//if is, add sp to type -> sp map
if(!typeMap.containsKey(type)) {
//each variable can only contain 1 type for now @see:Rya-235?
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Entity.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Entity.java
index fb64ccf..6874a16 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Entity.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Entity.java
@@ -30,7 +30,7 @@
import org.apache.http.annotation.Immutable;
import org.apache.log4j.Logger;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.storage.EntityStorage;
import org.apache.rya.indexing.smarturi.SmartUriAdapter;
import org.apache.rya.indexing.smarturi.SmartUriException;
@@ -63,10 +63,10 @@
* an Entity by doing the following:
* <pre>
* final Entity entity = Entity.builder()
- * .setSubject(new RyaURI("urn:GTIN-14/00012345600012"))
- * .setExplicitType(new RyaURI("urn:icecream"))
- * .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
- * .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
+ * .setSubject(new RyaIRI("urn:GTIN-14/00012345600012"))
+ * .setExplicitType(new RyaIRI("urn:icecream"))
+ * .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
+ * .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
* .build();
* </pre>
* The two types of Entities that may be created are implicit and explicit.
@@ -79,13 +79,13 @@
public class Entity {
private static final Logger log = Logger.getLogger(Entity.class);
- private final RyaURI subject;
- private final ImmutableList<RyaURI> explicitTypeIds;
+ private final RyaIRI subject;
+ private final ImmutableList<RyaIRI> explicitTypeIds;
// First key is Type ID.
// Second key is Property Name.
// Value is the Property value for a specific type.
- private final ImmutableMap<RyaURI, ImmutableMap<RyaURI, Property>> properties;
+ private final ImmutableMap<RyaIRI, ImmutableMap<RyaIRI, Property>> properties;
private final int version;
@@ -105,9 +105,9 @@
* {@link Entity}.
*/
private Entity(
- final RyaURI subject,
- final ImmutableList<RyaURI> explicitTypeIds,
- final ImmutableMap<RyaURI, ImmutableMap<RyaURI, Property>> typeProperties,
+ final RyaIRI subject,
+ final ImmutableList<RyaIRI> explicitTypeIds,
+ final ImmutableMap<RyaIRI, ImmutableMap<RyaIRI, Property>> typeProperties,
final int version,
final IRI smartUri) {
this.subject = requireNonNull(subject);
@@ -138,9 +138,9 @@
* {@link EntityStorage} to prevent stale updates.
*/
private Entity(
- final RyaURI subject,
- final ImmutableList<RyaURI> explicitTypeIds,
- final ImmutableMap<RyaURI, ImmutableMap<RyaURI, Property>> typeProperties,
+ final RyaIRI subject,
+ final ImmutableList<RyaIRI> explicitTypeIds,
+ final ImmutableMap<RyaIRI, ImmutableMap<RyaIRI, Property>> typeProperties,
final int version) {
this(subject, explicitTypeIds, typeProperties, version, null);
}
@@ -148,21 +148,21 @@
/**
* @return Identifies the thing that is being represented as an Entity.
*/
- public RyaURI getSubject() {
+ public RyaIRI getSubject() {
return subject;
}
/**
* @return {@link Type}s that have been explicitly applied to the {@link Entity}.
*/
- public ImmutableList<RyaURI> getExplicitTypeIds() {
+ public ImmutableList<RyaIRI> getExplicitTypeIds() {
return explicitTypeIds;
}
/**
* @return All {@link Property}s that have been set for the Entity, grouped by Type ID.
*/
- public ImmutableMap<RyaURI, ImmutableMap<RyaURI, Property>> getProperties() {
+ public ImmutableMap<RyaIRI, ImmutableMap<RyaIRI, Property>> getProperties() {
return properties;
}
@@ -184,31 +184,31 @@
/**
* Does a lookup to see if the {@link Entity} contains the specified
* property for the specified type.
- * @param typeRyaUri the type {@link RyaURI}. (not {@code null})
- * @param propertyRyaUri the property {@link RyaURI}. (not {@code null})
+ * @param type the {@link Type}. (not {@code null})
+ * @param propertyRyaIri the property {@link RyaIRI}. (not {@code null})
* @return the {@link Property} or an empty {@link Optional} if it could not
* be found in the {@link Entity}.
*/
- public Optional<Property> lookupTypeProperty(final Type type, final RyaURI propertyRyaUri) {
+ public Optional<Property> lookupTypeProperty(final Type type, final RyaIRI propertyRyaIri) {
requireNonNull(type);
- return lookupTypeProperty(type.getId(), propertyRyaUri);
+ return lookupTypeProperty(type.getId(), propertyRyaIri);
}
/**
* Does a lookup to see if the {@link Entity} contains the specified
* property for the specified type.
- * @param typeRyaUri the type {@link RyaURI}. (not {@code null})
- * @param propertyRyaUri the property {@link RyaURI}. (not {@code null})
+ * @param typeRyaIri the type {@link RyaIRI}. (not {@code null})
+ * @param propertyRyaIri the property {@link RyaIRI}. (not {@code null})
* @return the {@link Property} or an empty {@link Optional} if it could not
* be found in the {@link Entity}.
*/
- public Optional<Property> lookupTypeProperty(final RyaURI typeRyaUri, final RyaURI propertyRyaUri) {
- requireNonNull(typeRyaUri);
- requireNonNull(propertyRyaUri);
- final ImmutableMap<RyaURI, Property> typePropertyMap = properties.get(typeRyaUri);
+ public Optional<Property> lookupTypeProperty(final RyaIRI typeRyaIri, final RyaIRI propertyRyaIri) {
+ requireNonNull(typeRyaIri);
+ requireNonNull(propertyRyaIri);
+ final ImmutableMap<RyaIRI, Property> typePropertyMap = properties.get(typeRyaIri);
Optional<Property> property = Optional.empty();
if (typePropertyMap != null) {
- property = Optional.ofNullable(typePropertyMap.get(propertyRyaUri));
+ property = Optional.ofNullable(typePropertyMap.get(propertyRyaIri));
}
return property;
}
@@ -240,7 +240,7 @@
* @return A TypedEntity using this object's values if any properties for the Type
* are present or if the Type was explicitly set. Otherwise an empty {@link Optional}.
*/
- public Optional<TypedEntity> makeTypedEntity(final RyaURI typeId) {
+ public Optional<TypedEntity> makeTypedEntity(final RyaIRI typeId) {
requireNonNull(typeId);
final boolean explicitlyHasType = explicitTypeIds.contains(typeId);
@@ -289,9 +289,9 @@
@DefaultAnnotation(NonNull.class)
public static class Builder {
- private RyaURI subject = null;
- private final List<RyaURI> explicitTypes = new ArrayList<>();
- private final Map<RyaURI, Map<RyaURI, Property>> properties = new HashMap<>();
+ private RyaIRI subject = null;
+ private final List<RyaIRI> explicitTypes = new ArrayList<>();
+ private final Map<RyaIRI, Map<RyaIRI, Property>> properties = new HashMap<>();
private IRI smartUri = null;
private int version = 0;
@@ -312,7 +312,7 @@
subject = entity.getSubject();
explicitTypes.addAll( entity.getExplicitTypeIds() );
- for(final Entry<RyaURI, ImmutableMap<RyaURI, Property>> entry : entity.getProperties().entrySet()) {
+ for(final Entry<RyaIRI, ImmutableMap<RyaIRI, Property>> entry : entity.getProperties().entrySet()) {
properties.put(entry.getKey(), Maps.newHashMap(entry.getValue()));
}
@@ -325,7 +325,7 @@
* @param subject - Identifies the {@link TypedEntity}.
* @return This {@link Builder} so that method invocations may be chained.
*/
- public Builder setSubject(@Nullable final RyaURI subject) {
+ public Builder setSubject(@Nullable final RyaIRI subject) {
this.subject = subject;
return this;
}
@@ -334,7 +334,7 @@
* @param typeId - A {@link Type} that has been explicity set for the {@link TypedEntity}.
* @return This {@link Builder} so that method invocations may be chained.
*/
- public Builder setExplicitType(@Nullable final RyaURI typeId) {
+ public Builder setExplicitType(@Nullable final RyaIRI typeId) {
if(typeId != null) {
explicitTypes.add(typeId);
}
@@ -347,7 +347,7 @@
* @param typeId - The Type ID to remove from the set of explicit types.
* @return This {@link Builder} so that method invocations may be chained.
*/
- public Builder unsetExplicitType(@Nullable final RyaURI typeId) {
+ public Builder unsetExplicitType(@Nullable final RyaIRI typeId) {
if(typeId != null) {
explicitTypes.remove(typeId);
}
@@ -361,7 +361,7 @@
* @param property - The Property values to add.
* @return This {@link Builder} so that method invocations may be chained.
*/
- public Builder setProperty(@Nullable final RyaURI typeId, @Nullable final Property property) {
+ public Builder setProperty(@Nullable final RyaIRI typeId, @Nullable final Property property) {
if(typeId != null && property != null) {
if(!properties.containsKey(typeId)) {
properties.put(typeId, new HashMap<>());
@@ -379,10 +379,10 @@
* @param propertyName - The name of the Property to remove.
* @return This {@link Builder} so that method invocations may be chained.
*/
- public Builder unsetProperty(@Nullable final RyaURI typeId, @Nullable final RyaURI propertyName) {
+ public Builder unsetProperty(@Nullable final RyaIRI typeId, @Nullable final RyaIRI propertyName) {
if(typeId != null && propertyName != null) {
if(properties.containsKey(typeId)) {
- final Map<RyaURI, Property> typedProperties = properties.get(typeId);
+ final Map<RyaIRI, Property> typedProperties = properties.get(typeId);
if(typedProperties.containsKey(propertyName)) {
typedProperties.remove(propertyName);
}
@@ -426,8 +426,8 @@
* @return Builds an instance of {@link Entity} using this builder's values.
*/
public Entity build() {
- final ImmutableMap.Builder<RyaURI, ImmutableMap<RyaURI, Property>> propertiesBuilder = ImmutableMap.builder();
- for(final Entry<RyaURI, Map<RyaURI, Property>> entry : properties.entrySet()) {
+ final ImmutableMap.Builder<RyaIRI, ImmutableMap<RyaIRI, Property>> propertiesBuilder = ImmutableMap.builder();
+ for(final Entry<RyaIRI, Map<RyaIRI, Property>> entry : properties.entrySet()) {
propertiesBuilder.put(entry.getKey(), ImmutableMap.copyOf( entry.getValue() ));
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Property.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Property.java
index 53b141e..b44c52c 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Property.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Property.java
@@ -24,7 +24,7 @@
import org.apache.http.annotation.Immutable;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
import edu.umd.cs.findbugs.annotations.NonNull;
@@ -36,7 +36,7 @@
@DefaultAnnotation(NonNull.class)
public class Property {
- private final RyaURI name;
+ private final RyaIRI name;
private final RyaType value;
/**
@@ -45,7 +45,7 @@
* @param name - Uniquely identifies the {@link Property}. (not null)
* @param value - The value of the {@link Property}. (not null)
*/
- public Property(final RyaURI name, final RyaType value) {
+ public Property(final RyaIRI name, final RyaType value) {
this.name = requireNonNull(name);
this.value = requireNonNull(value);
}
@@ -53,7 +53,7 @@
/**
* @return Uniquely identifies the {@link Property}.
*/
- public RyaURI getName() {
+ public RyaIRI getName() {
return name;
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Type.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Type.java
index f539e7c..a7c988b 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Type.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/Type.java
@@ -23,7 +23,7 @@
import java.util.Objects;
import org.apache.http.annotation.Immutable;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.storage.TypeStorage;
import com.google.common.collect.ImmutableSet;
@@ -51,12 +51,12 @@
/**
* Uniquely identifies the Type within a {@link TypeStorage}.
*/
- private final RyaURI id;
+ private final RyaIRI id;
/**
* The names of {@link Property}s that may be part of an {@link TypedEntity} of this type.
*/
- private final ImmutableSet<RyaURI> propertyNames;
+ private final ImmutableSet<RyaIRI> propertyNames;
/**
* Constructs an instance of {@link Type}.
@@ -64,7 +64,7 @@
* @param id - Uniquely identifies the Type within a {@link TypeStorage}. (not null)
* @param propertyNames - The names of {@link Property}s that may be part of an {@link TypedEntity} of this type. (not null)
*/
- public Type(final RyaURI id, final ImmutableSet<RyaURI> propertyNames) {
+ public Type(final RyaIRI id, final ImmutableSet<RyaIRI> propertyNames) {
this.id = requireNonNull(id);
this.propertyNames = requireNonNull(propertyNames);
}
@@ -72,14 +72,14 @@
/**
* @return Uniquely identifies the Type within a {@link TypeStorage}.
*/
- public RyaURI getId() {
+ public RyaIRI getId() {
return id;
}
/**
* @return The names of {@link Property}s that may be part of an {@link TypedEntity} of this type.
*/
- public ImmutableSet<RyaURI> getPropertyNames() {
+ public ImmutableSet<RyaIRI> getPropertyNames() {
return propertyNames;
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/TypedEntity.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/TypedEntity.java
index 0d019c2..816e7fa 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/TypedEntity.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/model/TypedEntity.java
@@ -27,7 +27,7 @@
import org.apache.http.annotation.Immutable;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import com.google.common.collect.ImmutableCollection;
import com.google.common.collect.ImmutableMap;
@@ -47,12 +47,12 @@
/**
* The Subject of the {@link Entity} this view was derived from.
*/
- private final RyaURI subject;
+ private final RyaIRI subject;
/**
* The ID of the {@link Type} that defines the structure of this TypedEntity.
*/
- private final RyaURI typeId;
+ private final RyaIRI typeId;
/**
* {@code true} if the Entity's Type has been explicitly set to the {@link #typeId}
@@ -66,7 +66,7 @@
* </p>
* They are mapped from property name to property object for quick lookup.
*/
- private final ImmutableMap<RyaURI, Property> optionalFields;
+ private final ImmutableMap<RyaIRI, Property> optionalFields;
/**
* Constructs an instance of {@link TypedEntity}.
@@ -78,10 +78,10 @@
* it has properties that happen to match that type's properties).
* @param properties - The optional {@link Property} values of this {@link TypedEntity}. (not null)
*/
- private TypedEntity(final RyaURI subject,
- final RyaURI dataTypeId,
+ private TypedEntity(final RyaIRI subject,
+ final RyaIRI dataTypeId,
final boolean explicitlyTyped,
- final ImmutableMap<RyaURI, Property> optionalFields) {
+ final ImmutableMap<RyaIRI, Property> optionalFields) {
this.subject = requireNonNull(subject);
typeId = requireNonNull(dataTypeId);
this.optionalFields = requireNonNull(optionalFields);
@@ -91,14 +91,14 @@
/**
* @return The Subject of the {@link Entity} this view was derived from.
*/
- public RyaURI getSubject() {
+ public RyaIRI getSubject() {
return subject;
}
/**
* @return The ID of the {@link Type} that defines the structure of this Entity.
*/
- public RyaURI getTypeId() {
+ public RyaIRI getTypeId() {
return typeId;
}
@@ -125,7 +125,7 @@
* @param propertyName - The name of {@link Property} that may be in this Entity. (not null)
* @return The value of the Property if it has been set.
*/
- public Optional<RyaType> getPropertyValue(final RyaURI propertyName) {
+ public Optional<RyaType> getPropertyValue(final RyaIRI propertyName) {
requireNonNull(propertyName);
final Property field = optionalFields.get(propertyName);
@@ -184,16 +184,16 @@
@DefaultAnnotation(NonNull.class)
public static class Builder {
- private RyaURI subject;
- private RyaURI typeId;
+ private RyaIRI subject;
+ private RyaIRI typeId;
private boolean explicitlyTyped = false;
- private final Map<RyaURI, Property> properties = new HashMap<>();
+ private final Map<RyaIRI, Property> properties = new HashMap<>();
/**
* @param subject - The Subject of the {@link Entity} this view was derived from.
* @return This {@link Builder} so that method invocations may be chained.
*/
- public Builder setId(@Nullable final RyaURI subject) {
+ public Builder setId(@Nullable final RyaIRI subject) {
this.subject = subject;
return this;
}
@@ -202,7 +202,7 @@
* @param typeId - The ID of the {@link Type} that defines the structure of this Entity.
* @return This {@link Builder} so that method invocations may be chained.
*/
- public Builder setTypeId(@Nullable final RyaURI typeId) {
+ public Builder setTypeId(@Nullable final RyaIRI typeId) {
this.typeId = typeId;
return this;
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/query/EntityQueryNode.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/query/EntityQueryNode.java
index 70efc3a..7102e63 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/query/EntityQueryNode.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/query/EntityQueryNode.java
@@ -31,7 +31,7 @@
import java.util.function.Consumer;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
@@ -73,9 +73,9 @@
private static final Logger LOG = LoggerFactory.getLogger(EntityQueryNode.class);
/**
- * The RyaURI that when used as the Predicate of a Statement Pattern indicates the Type of the Entities.
+ * The {@link RyaIRI} that when used as the Predicate of a Statement Pattern indicates the Type of the Entities.
*/
- private static final RyaURI TYPE_ID_URI = new RyaURI(RDF.TYPE.toString());
+ private static final RyaIRI TYPE_ID_IRI = new RyaIRI(RDF.TYPE.toString());
// Provided at construction time.
private final Type type;
@@ -91,7 +91,7 @@
private final Set<String> bindingNames;
// Information about the objects of the patterns.
- private final ImmutableMap<RyaURI, Var> objectVariables;
+ private final ImmutableMap<RyaIRI, Var> objectVariables;
// Properties of the Type found in the query
private final Set<Property> properties;
@@ -133,17 +133,17 @@
}
// Any constant that appears in the Object portion of the SP will be used to make sure they match.
- final Builder<RyaURI, Var> builder = ImmutableMap.builder();
+ final Builder<RyaIRI, Var> builder = ImmutableMap.builder();
for(final StatementPattern sp : patterns) {
final Var object = sp.getObjectVar();
final Var pred = sp.getPredicateVar();
- final RyaURI predURI = new RyaURI(pred.getValue().stringValue());
+ final RyaIRI predIRI = new RyaIRI(pred.getValue().stringValue());
bindingNames.addAll(sp.getBindingNames());
if(object.isConstant() && !pred.getValue().equals(RDF.TYPE)) {
final RyaType propertyType = RdfToRyaConversions.convertValue(object.getValue());
- properties.add(new Property(predURI, propertyType));
+ properties.add(new Property(predIRI, propertyType));
}
- builder.put(predURI, object);
+ builder.put(predIRI, object);
}
objectVariables = builder.build();
}
@@ -209,10 +209,10 @@
boolean typeFound = false;
for(final StatementPattern pattern : patterns) {
- final RyaURI predicate = new RyaURI(pattern.getPredicateVar().getValue().toString());
+ final RyaIRI predicate = new RyaIRI(pattern.getPredicateVar().getValue().toString());
- if(predicate.equals(TYPE_ID_URI)) {
- final RyaURI typeId = new RyaURI( pattern.getObjectVar().getValue().stringValue() );
+ if(predicate.equals(TYPE_ID_IRI)) {
+ final RyaIRI typeId = new RyaIRI( pattern.getObjectVar().getValue().stringValue() );
if(typeId.equals(type.getId())) {
typeFound = true;
} else {
@@ -241,8 +241,8 @@
for(final StatementPattern pattern : patterns) {
// Skip TYPE patterns.
- final RyaURI predicate = new RyaURI( pattern.getPredicateVar().getValue().toString() );
- if(predicate.equals(TYPE_ID_URI)) {
+ final RyaIRI predicate = new RyaIRI( pattern.getPredicateVar().getValue().toString() );
+ if(predicate.equals(TYPE_ID_IRI)) {
continue;
}
@@ -283,7 +283,7 @@
if(subjectIsConstant) {
// if it is, fetch that value and then fetch the entity for the subject.
subj = subjectConstant.get();
- entitiesCursor = entities.search(Optional.of(new RyaURI(subj)), type, properties);
+ entitiesCursor = entities.search(Optional.of(new RyaIRI(subj)), type, properties);
} else {
entitiesCursor = entities.search(Optional.empty(), type, properties);
}
@@ -292,8 +292,8 @@
final TypedEntity typedEntity = entitiesCursor.next();
final ImmutableCollection<Property> properties = typedEntity.getProperties();
//ensure properties match and only add properties that are in the statement patterns to the binding set
- for(final RyaURI key : objectVariables.keySet()) {
- final Optional<RyaType> prop = typedEntity.getPropertyValue(new RyaURI(key.getData()));
+ for(final RyaIRI key : objectVariables.keySet()) {
+ final Optional<RyaType> prop = typedEntity.getPropertyValue(new RyaIRI(key.getData()));
if(prop.isPresent()) {
final RyaType type = prop.get();
final String bindingName = objectVariables.get(key).getName();
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/EntityStorage.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/EntityStorage.java
index 6f0b9ae..22dad92 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/EntityStorage.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/EntityStorage.java
@@ -21,7 +21,7 @@
import java.util.Optional;
import java.util.Set;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
import org.apache.rya.indexing.entity.model.Type;
@@ -42,13 +42,13 @@
* Search the stored {@link Entity}s that have a specific {@link Type} as
* well as the provided {@link Property} values.
*
- * @param subject - The {@link RyaURI} subject of the Entity. (Optional)
+ * @param subject - The {@link RyaIRI} subject of the Entity. (Optional)
* @param type - The {@link Type} of the Entities. (not null)
* @param properties - The {@link Property} values that must be set on the Entity. (not null)
* @return A {@link CloseableIterator} over the {@link TypedEntity}s that match the search parameters.
* @throws EntityStorageException A problem occurred while searching the storage.
*/
- public ConvertingCursor<TypedEntity> search(final Optional<RyaURI> subject, Type type, Set<Property> properties) throws EntityStorageException;
+ public ConvertingCursor<TypedEntity> search(final Optional<RyaIRI> subject, Type type, Set<Property> properties) throws EntityStorageException;
/**
* Indicates a problem while interacting with an {@link EntityStorage}.
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/TypeStorage.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/TypeStorage.java
index 31b1790..5a23044 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/TypeStorage.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/TypeStorage.java
@@ -20,7 +20,7 @@
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.EntityIndexException;
import org.apache.rya.indexing.entity.model.Type;
import org.apache.rya.indexing.entity.storage.mongo.ConvertingCursor;
@@ -49,7 +49,7 @@
* @return The {@link Type} if one exists for the ID.
* @throws TypeStorageException A problem occurred while fetching from the storage.
*/
- public Optional<Type> get(RyaURI typeId) throws TypeStorageException;
+ public Optional<Type> get(RyaIRI typeId) throws TypeStorageException;
/**
* Get all {@link Type}s that include a specific {@link Property} name.
@@ -59,7 +59,7 @@
* @throws TypeStorageException A problem occurred while searching for the Types
* that have the Property name.
*/
- public ConvertingCursor<Type> search(RyaURI propertyName) throws TypeStorageException;
+ public ConvertingCursor<Type> search(RyaIRI propertyName) throws TypeStorageException;
/**
* Deletes a {@link Type} from the storage.
@@ -68,7 +68,7 @@
* @return {@code true} if something was deleted; otherwise {@code false}.
* @throws TypeStorageException A problem occurred while deleting from the storage.
*/
- public boolean delete(RyaURI typeId) throws TypeStorageException;
+ public boolean delete(RyaIRI typeId) throws TypeStorageException;
/**
* A problem occurred while interacting with a {@link TypeStorage}.
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/EntityDocumentConverter.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/EntityDocumentConverter.java
index 7333de1..5d1a1a6 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/EntityDocumentConverter.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/EntityDocumentConverter.java
@@ -24,7 +24,7 @@
import java.util.stream.Collectors;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
import org.apache.rya.indexing.entity.storage.mongo.key.MongoDbSafeKey;
@@ -60,7 +60,7 @@
.collect(Collectors.toList()));
final Document propertiesDoc = new Document();
- for(final RyaURI typeId : entity.getProperties().keySet()) {
+ for(final RyaIRI typeId : entity.getProperties().keySet()) {
final Document typePropertiesDoc = new Document();
entity.getProperties().get(typeId)
.forEach((propertyNameUri, property) -> {
@@ -112,10 +112,10 @@
// Perform the conversion.
final Entity.Builder builder = Entity.builder()
- .setSubject( new RyaURI(document.getString(SUBJECT)) );
+ .setSubject( new RyaIRI(document.getString(SUBJECT)) );
((List<String>)document.get(EXPLICIT_TYPE_IDS)).stream()
- .forEach(explicitTypeId -> builder.setExplicitType(new RyaURI(explicitTypeId)));
+ .forEach(explicitTypeId -> builder.setExplicitType(new RyaIRI(explicitTypeId)));
final Document propertiesDoc = (Document) document.get(PROPERTIES);
for(final String typeId : propertiesDoc.keySet()) {
@@ -124,7 +124,7 @@
final String decodedPropertyName = MongoDbSafeKey.decodeKey(propertyName);
final Document value = (Document) typePropertiesDoc.get(propertyName);
final RyaType propertyValue = ryaTypeConverter.fromDocument( value );
- builder.setProperty(new RyaURI(typeId), new Property(new RyaURI(decodedPropertyName), propertyValue));
+ builder.setProperty(new RyaIRI(typeId), new Property(new RyaIRI(decodedPropertyName), propertyValue));
}
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/MongoEntityStorage.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/MongoEntityStorage.java
index 87634d7..63a0046 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/MongoEntityStorage.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/MongoEntityStorage.java
@@ -31,7 +31,7 @@
import org.apache.commons.configuration.ConfigurationException;
import org.apache.log4j.Logger;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
import org.apache.rya.indexing.entity.model.Type;
@@ -175,7 +175,7 @@
}
@Override
- public Optional<Entity> get(final RyaURI subject) throws EntityStorageException {
+ public Optional<Entity> get(final RyaIRI subject) throws EntityStorageException {
requireNonNull(subject);
try {
@@ -194,7 +194,7 @@
}
@Override
- public ConvertingCursor<TypedEntity> search(final Optional<RyaURI> subject, final Type type, final Set<Property> properties) throws EntityStorageException {
+ public ConvertingCursor<TypedEntity> search(final Optional<RyaIRI> subject, final Type type, final Set<Property> properties) throws EntityStorageException {
requireNonNull(type);
requireNonNull(properties);
@@ -238,7 +238,7 @@
}
@Override
- public boolean delete(final RyaURI subject) throws EntityStorageException {
+ public boolean delete(final RyaIRI subject) throws EntityStorageException {
requireNonNull(subject);
try {
@@ -253,7 +253,7 @@
}
}
- private static Bson makeSubjectFilter(final RyaURI subject) {
+ private static Bson makeSubjectFilter(final RyaIRI subject) {
return Filters.eq(EntityDocumentConverter.SUBJECT, subject.getData());
}
@@ -261,11 +261,11 @@
return Filters.eq(EntityDocumentConverter.VERSION, version);
}
- private static Bson makeExplicitTypeFilter(final RyaURI typeId) {
+ private static Bson makeExplicitTypeFilter(final RyaIRI typeId) {
return Filters.eq(EntityDocumentConverter.EXPLICIT_TYPE_IDS, typeId.getData());
}
- private static Stream<Bson> makePropertyFilters(final RyaURI typeId, final Property property) {
+ private static Stream<Bson> makePropertyFilters(final RyaIRI typeId, final Property property) {
final String propertyName = property.getName().getData();
final String encodedPropertyName = MongoDbSafeKey.encodeKey(propertyName);
@@ -310,21 +310,21 @@
/**
* Searches the Entity storage for all Entities that contain all the
* specified explicit type IDs.
- * @param explicitTypeIds the {@link ImmutableList} of {@link RyaURI}s that
+ * @param explicitTypeIds the {@link ImmutableList} of {@link RyaIRI}s that
* are being searched for.
* @return the {@link List} of {@link Entity}s that have all the specified
* explicit type IDs. If nothing was found an empty {@link List} is
* returned.
* @throws EntityStorageException
*/
- private List<Entity> searchHasAllExplicitTypes(final ImmutableList<RyaURI> explicitTypeIds) throws EntityStorageException {
+ private List<Entity> searchHasAllExplicitTypes(final ImmutableList<RyaIRI> explicitTypeIds) throws EntityStorageException {
final List<Entity> hasAllExplicitTypesEntities = new ArrayList<>();
if (!explicitTypeIds.isEmpty()) {
// Grab the first type from the explicit type IDs.
- final RyaURI firstType = explicitTypeIds.get(0);
+ final RyaIRI firstType = explicitTypeIds.get(0);
// Check if that type exists anywhere in storage.
- final List<RyaURI> subjects = new ArrayList<>();
+ final List<RyaIRI> subjects = new ArrayList<>();
Optional<Type> type;
try {
if (mongoTypeStorage == null) {
@@ -339,13 +339,13 @@
final ConvertingCursor<TypedEntity> cursor = search(Optional.empty(), type.get(), Collections.emptySet());
while (cursor.hasNext()) {
final TypedEntity typedEntity = cursor.next();
- final RyaURI subject = typedEntity.getSubject();
+ final RyaIRI subject = typedEntity.getSubject();
subjects.add(subject);
}
}
// Now grab all the Entities that have the subjects we found.
- for (final RyaURI subject : subjects) {
+ for (final RyaIRI subject : subjects) {
final Optional<Entity> entityFromSubject = get(subject);
if (entityFromSubject.isPresent()) {
final Entity candidateEntity = entityFromSubject.get();
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/MongoTypeStorage.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/MongoTypeStorage.java
index 0083671..d0aa2fc 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/MongoTypeStorage.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/MongoTypeStorage.java
@@ -22,7 +22,7 @@
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Type;
import org.apache.rya.indexing.entity.storage.TypeStorage;
import org.apache.rya.indexing.entity.storage.mongo.DocumentConverter.DocumentConverterException;
@@ -83,7 +83,7 @@
}
@Override
- public Optional<Type> get(final RyaURI typeId) throws TypeStorageException {
+ public Optional<Type> get(final RyaIRI typeId) throws TypeStorageException {
requireNonNull(typeId);
try {
@@ -102,7 +102,7 @@
}
@Override
- public ConvertingCursor<Type> search(final RyaURI propertyName) throws TypeStorageException {
+ public ConvertingCursor<Type> search(final RyaIRI propertyName) throws TypeStorageException {
requireNonNull(propertyName);
try {
@@ -128,7 +128,7 @@
}
@Override
- public boolean delete(final RyaURI typeId) throws TypeStorageException {
+ public boolean delete(final RyaIRI typeId) throws TypeStorageException {
requireNonNull(typeId);
try {
@@ -143,7 +143,7 @@
}
}
- private static Bson makeIdFilter(final RyaURI typeId) {
+ private static Bson makeIdFilter(final RyaIRI typeId) {
return Filters.eq(TypeDocumentConverter.ID, typeId.getData());
}
}
\ No newline at end of file
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverter.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverter.java
index 37c65bb..1f072e2 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverter.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverter.java
@@ -23,7 +23,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Type;
import org.bson.Document;
@@ -69,11 +69,11 @@
"' because its '" + PROPERTY_NAMES + "' field is missing.");
}
- final RyaURI typeId = new RyaURI( document.getString(ID) );
+ final RyaIRI typeId = new RyaIRI( document.getString(ID) );
- final ImmutableSet.Builder<RyaURI> propertyNames = ImmutableSet.builder();
+ final ImmutableSet.Builder<RyaIRI> propertyNames = ImmutableSet.builder();
((List<String>) document.get(PROPERTY_NAMES))
- .forEach(propertyName -> propertyNames.add(new RyaURI(propertyName)));
+ .forEach(propertyName -> propertyNames.add(new RyaIRI(propertyName)));
return new Type(typeId, propertyNames.build());
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/update/BaseEntityIndexer.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/update/BaseEntityIndexer.java
index 26247a6..c495e17 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/update/BaseEntityIndexer.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/update/BaseEntityIndexer.java
@@ -37,7 +37,7 @@
import org.apache.log4j.Logger;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
import org.apache.rya.indexing.entity.model.Type;
@@ -68,7 +68,7 @@
/**
* When this IRI is the Predicate of a Statement, it indicates a {@link Type} for an {@link Entity}.
*/
- private static final RyaURI TYPE_URI = new RyaURI( RDF.TYPE.toString() );
+ private static final RyaIRI TYPE_IRI = new RyaIRI( RDF.TYPE.toString() );
protected final AtomicReference<StatefulMongoDBRdfConfiguration> configuration = new AtomicReference<>();
private final AtomicReference<EntityStorage> entities = new AtomicReference<>();
@@ -108,10 +108,10 @@
public void storeStatements(final Collection<RyaStatement> statements) throws IOException {
requireNonNull(statements);
- final Map<RyaURI,List<RyaStatement>> groupedBySubject = statements.stream()
+ final Map<RyaIRI,List<RyaStatement>> groupedBySubject = statements.stream()
.collect(groupingBy(RyaStatement::getSubject));
- for(final Entry<RyaURI, List<RyaStatement>> entry : groupedBySubject.entrySet()) {
+ for(final Entry<RyaIRI, List<RyaStatement>> entry : groupedBySubject.entrySet()) {
try {
updateEntity(entry.getKey(), entry.getValue());
} catch (final IndexingException e) {
@@ -127,7 +127,7 @@
* @param statements - Statements that the {@link Entity} will be updated with. (not null)
* @throws IndexingException
*/
- private void updateEntity(final RyaURI subject, final Collection<RyaStatement> statements) throws IndexingException {
+ private void updateEntity(final RyaIRI subject, final Collection<RyaStatement> statements) throws IndexingException {
requireNonNull(subject);
requireNonNull(statements);
@@ -153,20 +153,20 @@
for(final RyaStatement statement : statements) {
// The Statement is setting an Explicit Type ID for the Entity.
- if(Objects.equal(TYPE_URI, statement.getPredicate())) {
- final RyaURI typeId = new RyaURI(statement.getObject().getData());
+ if(Objects.equal(TYPE_IRI, statement.getPredicate())) {
+ final RyaIRI typeId = new RyaIRI(statement.getObject().getData());
updated.setExplicitType(typeId);
}
// The Statement is adding a Property to the Entity.
else {
- final RyaURI propertyName = statement.getPredicate();
+ final RyaIRI propertyName = statement.getPredicate();
final RyaType propertyValue = statement.getObject();
try(final ConvertingCursor<Type> typesIt = types.search(propertyName)) {
// Set the Property for each type that includes the Statement's predicate.
while(typesIt.hasNext()) {
- final RyaURI typeId = typesIt.next().getId();
+ final RyaIRI typeId = typesIt.next().getId();
updated.setProperty(typeId, new Property(propertyName, propertyValue));
}
} catch (final TypeStorageException | IOException e) {
@@ -202,9 +202,9 @@
final Entity.Builder updated = Entity.builder(oldEntity);
updated.setVersion(oldEntity.getVersion() + 1);
- if(TYPE_URI.equals(statement.getPredicate())) {
+ if(TYPE_IRI.equals(statement.getPredicate())) {
// If the Type ID already isn't in the list of explicit types, then do nothing.
- final RyaURI typeId = new RyaURI( statement.getObject().getData() );
+ final RyaIRI typeId = new RyaIRI( statement.getObject().getData() );
if(!oldEntity.getExplicitTypeIds().contains(typeId)) {
return Optional.empty();
}
@@ -213,11 +213,11 @@
updated.unsetExplicitType(typeId);
} else {
// If the deleted property appears within the old entity's properties, then remove it.
- final RyaURI deletedPropertyName = statement.getPredicate();
+ final RyaIRI deletedPropertyName = statement.getPredicate();
boolean propertyWasPresent = false;
- for(final RyaURI typeId : oldEntity.getProperties().keySet()) {
- for(final RyaURI propertyName : oldEntity.getProperties().get(typeId).keySet()) {
+ for(final RyaIRI typeId : oldEntity.getProperties().keySet()) {
+ for(final RyaIRI propertyName : oldEntity.getProperties().get(typeId).keySet()) {
if(deletedPropertyName.equals(propertyName)) {
propertyWasPresent = true;
updated.unsetProperty(typeId, deletedPropertyName);
@@ -255,7 +255,7 @@
}
@Override
- public void dropGraph(final RyaURI... graphs) {
+ public void dropGraph(final RyaIRI... graphs) {
// We do not support graphs when performing entity centric indexing.
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/update/EntityUpdater.java b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/update/EntityUpdater.java
index 91f1146..6bc3680 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/entity/update/EntityUpdater.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/entity/update/EntityUpdater.java
@@ -22,7 +22,7 @@
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.storage.EntityStorage;
import org.apache.rya.indexing.entity.storage.EntityStorage.EntityStorageException;
@@ -36,7 +36,7 @@
* Performs update operations over an {@link EntityStorage}.
*/
@DefaultAnnotation(NonNull.class)
-public class EntityUpdater implements MongoDocumentUpdater<RyaURI, Entity>{
+public class EntityUpdater implements MongoDocumentUpdater<RyaIRI, Entity>{
private final EntityStorage storage;
@@ -68,7 +68,7 @@
}
@Override
- public Optional<Entity> getOld(final RyaURI key) throws EntityStorageException {
+ public Optional<Entity> getOld(final RyaIRI key) throws EntityStorageException {
try {
return storage.get(key);
} catch (final ObjectStorageException e) {
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/external/PrecomputedJoinIndexer.java b/extras/indexing/src/main/java/org/apache/rya/indexing/external/PrecomputedJoinIndexer.java
index c2086d2..97c5ec2 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/external/PrecomputedJoinIndexer.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/external/PrecomputedJoinIndexer.java
@@ -33,7 +33,7 @@
import org.apache.rya.accumulo.experimental.AbstractAccumuloIndexer;
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.log.LogUtils;
import org.apache.rya.api.persist.RyaDAO;
import org.apache.rya.indexing.external.accumulo.AccumuloPcjStorageSupplier;
@@ -260,7 +260,7 @@
}
@Override
- public void dropGraph(final RyaURI... graphs) {
+ public void dropGraph(final RyaIRI... graphs) {
log.warn("PCJ indices do not store Graph metadata, so graph results can not be dropped.");
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java b/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java
index 36839b3..7f4a0bd 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/AbstractMongoIndexer.java
@@ -27,7 +27,7 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.log4j.Logger;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.indexing.StatementConstraints;
import org.apache.rya.mongodb.MongoDBRdfConfiguration;
@@ -182,7 +182,7 @@
}
@Override
- public void dropGraph(final RyaURI... graphs) {
+ public void dropGraph(final RyaIRI... graphs) {
throw new UnsupportedOperationException();
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/MongoDbSmartUri.java b/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/MongoDbSmartUri.java
index f392b5e..17e32c3 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/MongoDbSmartUri.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/MongoDbSmartUri.java
@@ -26,7 +26,7 @@
import java.util.Set;
import org.apache.hadoop.conf.Configuration;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
import org.apache.rya.indexing.entity.model.Type;
@@ -64,7 +64,7 @@
}
@Override
- public void storeEntity(final RyaURI subject, final Map<IRI, Value> map) throws SmartUriException {
+ public void storeEntity(final RyaIRI subject, final Map<IRI, Value> map) throws SmartUriException {
checkInit();
final IRI uri = SmartUriAdapter.serializeUri(subject, map);
@@ -103,7 +103,7 @@
}
@Override
- public Entity queryEntity(final RyaURI subject) throws SmartUriException {
+ public Entity queryEntity(final RyaIRI subject) throws SmartUriException {
checkInit();
// Query it.
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/update/RyaObjectStorage.java b/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/update/RyaObjectStorage.java
index bd04368..c420fba 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/update/RyaObjectStorage.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/mongodb/update/RyaObjectStorage.java
@@ -20,12 +20,12 @@
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.mongodb.IndexingException;
/**
* Stores and provides access to objects of type T.
- * The RyaURI subject is the primary storage key used.
+ * The {@link RyaIRI} subject is the primary storage key used.
* @param <T> - The type of object to store/access.
*/
public interface RyaObjectStorage<T> {
@@ -46,7 +46,7 @@
* @return The Object if one exists for the subject.
* @throws ObjectStorageException A problem occurred while fetching the Object from the storage.
*/
- public Optional<T> get(RyaURI subject) throws ObjectStorageException;
+ public Optional<T> get(RyaIRI subject) throws ObjectStorageException;
/**
* Update the state of an {@link RyaObjectStorage#T}.
@@ -65,7 +65,7 @@
* @return {@code true} if something was deleted; otherwise {@code false}.
* @throws ObjectStorageException A problem occurred while deleting from the storage.
*/
- public boolean delete(RyaURI subject) throws ObjectStorageException;
+ public boolean delete(RyaIRI subject) throws ObjectStorageException;
/**
* Indicates a problem while interacting with an {@link RyaObjectStorage}.
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/SmartUriAdapter.java b/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/SmartUriAdapter.java
index d46d310..21d5ea5 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/SmartUriAdapter.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/SmartUriAdapter.java
@@ -36,7 +36,7 @@
import org.apache.http.client.utils.URLEncodedUtils;
import org.apache.http.message.BasicNameValuePair;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.indexing.entity.model.Entity;
@@ -71,11 +71,11 @@
private SmartUriAdapter() {
}
- private static IRI createTypePropertiesUri(final ImmutableMap<RyaURI, ImmutableMap<RyaURI, Property>> typeProperties) throws SmartUriException {
+ private static IRI createTypePropertiesUri(final ImmutableMap<RyaIRI, ImmutableMap<RyaIRI, Property>> typeProperties) throws SmartUriException {
final List<NameValuePair> nameValuePairs = new ArrayList<>();
- for (final Entry<RyaURI, ImmutableMap<RyaURI, Property>> typeProperty : typeProperties.entrySet()) {
- final RyaURI type = typeProperty.getKey();
- final Map<RyaURI, Property> propertyMap = typeProperty.getValue();
+ for (final Entry<RyaIRI, ImmutableMap<RyaIRI, Property>> typeProperty : typeProperties.entrySet()) {
+ final RyaIRI type = typeProperty.getKey();
+ final Map<RyaIRI, Property> propertyMap = typeProperty.getValue();
final IRI typeUri = createIndividualTypeWithPropertiesUri(type, propertyMap);
final String keyString = type.getDataType().getLocalName();
final String valueString = typeUri.getLocalName();
@@ -97,7 +97,7 @@
return VF.createIRI(uriString);
}
- private static String getShortNameForType(final RyaURI type) throws SmartUriException {
+ private static String getShortNameForType(final RyaIRI type) throws SmartUriException {
final String shortName = VF.createIRI(type.getData()).getLocalName();
return shortName;
}
@@ -118,18 +118,18 @@
return formattedUriString;
}
- private static Map<RyaURI, String> createTypeMap(final List<RyaURI> types) throws SmartUriException {
- final Map<RyaURI, String> map = new LinkedHashMap<>();
- for (final RyaURI type : types) {
+ private static Map<RyaIRI, String> createTypeMap(final List<RyaIRI> types) throws SmartUriException {
+ final Map<RyaIRI, String> map = new LinkedHashMap<>();
+ for (final RyaIRI type : types) {
final String shortName = getShortNameForType(type);
map.put(type, shortName);
}
return map;
}
- private static IRI createTypeMapUri(final List<RyaURI> types) throws SmartUriException {
+ private static IRI createTypeMapUri(final List<RyaIRI> types) throws SmartUriException {
final List<NameValuePair> nameValuePairs = new ArrayList<>();
- for (final RyaURI type : types) {
+ for (final RyaIRI type : types) {
final String shortName = getShortNameForType(type);
nameValuePairs.add(new BasicNameValuePair(type.getData(), shortName));
}
@@ -149,11 +149,11 @@
return VF.createIRI(uriString);
}
- private static Map<RyaURI, String> convertUriToTypeMap(final IRI typeMapUri) throws SmartUriException {
- final Map<RyaURI, String> map = new HashMap<>();
+ private static Map<RyaIRI, String> convertIriToTypeMap(final IRI typeMapIri) throws SmartUriException {
+ final Map<RyaIRI, String> map = new HashMap<>();
java.net.URI uri;
try {
- final URIBuilder uriBuilder = new URIBuilder(typeMapUri.stringValue());
+ final URIBuilder uriBuilder = new URIBuilder(typeMapIri.stringValue());
uri = uriBuilder.build();
} catch (final URISyntaxException e) {
throw new SmartUriException("Unable to parse Rya type map in Smart URI", e);
@@ -164,16 +164,16 @@
for (final NameValuePair param : params) {
final String name = param.getName();
final String value = param.getValue();
- final RyaURI type = new RyaURI(name);
+ final RyaIRI type = new RyaIRI(name);
map.put(type, value);
}
return map;
}
- private static IRI createIndividualTypeWithPropertiesUri(final RyaURI type, final Map<RyaURI, Property> map) throws SmartUriException {
+ private static IRI createIndividualTypeWithPropertiesUri(final RyaIRI type, final Map<RyaIRI, Property> map) throws SmartUriException {
final List<NameValuePair> nameValuePairs = new ArrayList<>();
- for (final Entry<RyaURI, Property> entry : map.entrySet()) {
- final RyaURI key = entry.getKey();
+ for (final Entry<RyaIRI, Property> entry : map.entrySet()) {
+ final RyaIRI key = entry.getKey();
final Property property = entry.getValue();
final RyaType ryaType = property.getValue();
@@ -198,41 +198,41 @@
return VF.createIRI(uriString);
}
- private static Entity convertMapToEntity(final RyaURI subject, final Map<RyaURI, Map<IRI, Value>> map) {
+ private static Entity convertMapToEntity(final RyaIRI subject, final Map<RyaIRI, Map<IRI, Value>> map) {
final Entity.Builder entityBuilder = Entity.builder();
entityBuilder.setSubject(subject);
- for (final Entry<RyaURI, Map<IRI, Value>> typeEntry : map.entrySet()) {
- final RyaURI type = typeEntry.getKey();
+ for (final Entry<RyaIRI, Map<IRI, Value>> typeEntry : map.entrySet()) {
+ final RyaIRI type = typeEntry.getKey();
final Map<IRI, Value> subMap = typeEntry.getValue();
entityBuilder.setExplicitType(type);
for (final Entry<IRI, Value> entry : subMap.entrySet()) {
final IRI uri = entry.getKey();
final Value value = entry.getValue();
- final RyaURI ryaUri = new RyaURI(uri.stringValue());
- final RyaURI ryaName = new RyaURI(uri.stringValue());
+ final RyaIRI ryaIri = new RyaIRI(uri.stringValue());
+ final RyaIRI ryaName = new RyaIRI(uri.stringValue());
final RyaType ryaType = new RyaType(value.stringValue());
final Property property = new Property(ryaName, ryaType);
- entityBuilder.setProperty(ryaUri, property);
+ entityBuilder.setProperty(ryaIri, property);
}
}
final Entity entity = entityBuilder.build();
return entity;
}
- public static RyaURI findSubject(final IRI uri) throws SmartUriException {
+ public static RyaIRI findSubject(final IRI uri) throws SmartUriException {
final String uriString = uri.stringValue();
return findSubject(uriString);
}
- public static RyaURI findSubject(final String uriString) throws SmartUriException {
+ public static RyaIRI findSubject(final String uriString) throws SmartUriException {
java.net.URI uri;
try {
uri = new java.net.URI(uriString);
} catch (final URISyntaxException e) {
throw new SmartUriException("Could not find subject in Smart URI", e);
}
- final RyaURI subject;
+ final RyaIRI subject;
final String fullFragment = uri.getFragment();
if (fullFragment != null) {
final int queryPosition = fullFragment.indexOf("?");
@@ -241,7 +241,7 @@
partialFragment = fullFragment.substring(0, queryPosition);
}
final String subjectString = uri.getScheme() + ":" + uri.getSchemeSpecificPart() + "#" + partialFragment;
- subject = new RyaURI(subjectString);
+ subject = new RyaIRI(subjectString);
} else {
final int queryPosition = uriString.indexOf("?");
String subjectString = null;
@@ -250,7 +250,7 @@
} else {
subjectString = uriString;
}
- subject = new RyaURI(subjectString);
+ subject = new RyaIRI(subjectString);
}
return subject;
@@ -267,22 +267,22 @@
final Map<IRI, Value> objectMap = new LinkedHashMap<>();
// Adds the entity's types to the Smart URI
- final List<RyaURI> typeIds = entity.getExplicitTypeIds();
- final Map<RyaURI, String> ryaTypeMap = createTypeMap(typeIds);
+ final List<RyaIRI> typeIds = entity.getExplicitTypeIds();
+ final Map<RyaIRI, String> ryaTypeMap = createTypeMap(typeIds);
final IRI ryaTypeMapUri = createTypeMapUri(typeIds);
final RyaType valueRyaType = new RyaType(XMLSchema.ANYURI, ryaTypeMapUri.stringValue());
final Value typeValue = RyaToRdfConversions.convertValue(valueRyaType);
objectMap.put(RYA_TYPES_URI, typeValue);
- final RyaURI subject = entity.getSubject();
- final Map<RyaURI, ImmutableMap<RyaURI, Property>> typeMap = entity.getProperties();
- for (final Entry<RyaURI, ImmutableMap<RyaURI, Property>> typeEntry : typeMap.entrySet()) {
- final RyaURI type = typeEntry.getKey();
+ final RyaIRI subject = entity.getSubject();
+ final Map<RyaIRI, ImmutableMap<RyaIRI, Property>> typeMap = entity.getProperties();
+ for (final Entry<RyaIRI, ImmutableMap<RyaIRI, Property>> typeEntry : typeMap.entrySet()) {
+ final RyaIRI type = typeEntry.getKey();
String typeShortName = ryaTypeMap.get(type);
typeShortName = typeShortName != null ? typeShortName + "." : "";
- final ImmutableMap<RyaURI, Property> typeProperties = typeEntry.getValue();
- for (final Entry<RyaURI, Property> properties : typeProperties.entrySet()) {
- final RyaURI key = properties.getKey();
+ final ImmutableMap<RyaIRI, Property> typeProperties = typeEntry.getValue();
+ for (final Entry<RyaIRI, Property> properties : typeProperties.entrySet()) {
+ final RyaIRI key = properties.getKey();
final Property property = properties.getValue();
final String valueString = property.getValue().getData();
final RyaType ryaType = property.getValue();
@@ -305,13 +305,13 @@
/**
* Serializes a map into a URI.
- * @param subject the {@link RyaURI} subject of the Entity. Identifies the
+ * @param subject the {@link RyaIRI} subject of the Entity. Identifies the
* thing that is being represented as an Entity.
* @param map the {@link Map} of {@link IRI}s to {@link Value}s.
* @return the Smart {@link IRI}.
* @throws SmartUriException
*/
- public static IRI serializeUri(final RyaURI subject, final Map<IRI, Value> map) throws SmartUriException {
+ public static IRI serializeUri(final RyaIRI subject, final Map<IRI, Value> map) throws SmartUriException {
final String subjectData = subject.getData();
final int fragmentPosition = subjectData.indexOf("#");
String prefix = subjectData;
@@ -389,12 +389,12 @@
throw new SmartUriException("Unable to deserialize Smart URI", e);
}
final Map<IRI, Value> map = new HashMap<>();
- final RyaURI subject = findSubject(iri.stringValue());
+ final RyaIRI subject = findSubject(iri.stringValue());
final List<NameValuePair> parameters = uriBuilder.getQueryParams();
- Map<RyaURI, String> entityTypeMap = new LinkedHashMap<>();
- Map<String, RyaURI> invertedEntityTypeMap = new LinkedHashMap<>();
- final Map<RyaURI, Map<IRI, Value>> fullMap = new LinkedHashMap<>();
+ Map<RyaIRI, String> entityTypeMap = new LinkedHashMap<>();
+ Map<String, RyaIRI> invertedEntityTypeMap = new LinkedHashMap<>();
+ final Map<RyaIRI, Map<IRI, Value>> fullMap = new LinkedHashMap<>();
for (final NameValuePair pair : parameters) {
final String keyString = pair.getName();
final String valueString = pair.getValue();
@@ -409,13 +409,13 @@
final IRI type = TypeDeterminer.determineType(decoded);
if (type == XMLSchema.ANYURI) {
if (keyString.equals(RYA_TYPES_URI.getLocalName())) {
- entityTypeMap = convertUriToTypeMap(VF.createIRI(decoded));
+ entityTypeMap = convertIriToTypeMap(VF.createIRI(decoded));
invertedEntityTypeMap = HashBiMap.create(entityTypeMap).inverse();
}
} else {
final int keyPrefixLocation = keyString.indexOf(".");
final String keyPrefix = keyString.substring(0, keyPrefixLocation);
- final RyaURI keyCorrespondingType = invertedEntityTypeMap.get(keyPrefix);
+ final RyaIRI keyCorrespondingType = invertedEntityTypeMap.get(keyPrefix);
final String keyName = keyString.substring(keyPrefixLocation + 1, keyString.length());
final RyaType ryaType = new RyaType(type, valueString);
@@ -452,12 +452,12 @@
throw new SmartUriException("Unable to deserialize Smart URI", e);
}
- final RyaURI subject = findSubject(uri.stringValue());
+ final RyaIRI subject = findSubject(uri.stringValue());
final List<NameValuePair> parameters = uriBuilder.getQueryParams();
- Map<RyaURI, String> entityTypeMap = new LinkedHashMap<>();
- Map<String, RyaURI> invertedEntityTypeMap = new LinkedHashMap<>();
- final Map<RyaURI, Map<IRI, Value>> fullMap = new LinkedHashMap<>();
+ Map<RyaIRI, String> entityTypeMap = new LinkedHashMap<>();
+ Map<String, RyaIRI> invertedEntityTypeMap = new LinkedHashMap<>();
+ final Map<RyaIRI, Map<IRI, Value>> fullMap = new LinkedHashMap<>();
for (final NameValuePair pair : parameters) {
final String keyString = pair.getName();
final String valueString = pair.getValue();
@@ -472,13 +472,13 @@
final IRI type = TypeDeterminer.determineType(decoded);
if (type == XMLSchema.ANYURI) {
if (keyString.equals(RYA_TYPES_URI.getLocalName())) {
- entityTypeMap = convertUriToTypeMap(VF.createIRI(decoded));
+ entityTypeMap = convertIriToTypeMap(VF.createIRI(decoded));
invertedEntityTypeMap = HashBiMap.create(entityTypeMap).inverse();
}
} else {
final int keyPrefixLocation = keyString.indexOf(".");
final String keyPrefix = keyString.substring(0, keyPrefixLocation);
- final RyaURI keyCorrespondingType = invertedEntityTypeMap.get(keyPrefix);
+ final RyaIRI keyCorrespondingType = invertedEntityTypeMap.get(keyPrefix);
final String keyName = keyString.substring(keyPrefixLocation + 1, keyString.length());
final RyaType ryaType = new RyaType(type, valueString);
@@ -577,9 +577,9 @@
public static Map<IRI, Value> entityToValueMap(final Entity entity) {
final Map<IRI, Value> map = new LinkedHashMap<>();
- for (final Entry<RyaURI, ImmutableMap<RyaURI, Property>> entry : entity.getProperties().entrySet()) {
- for (final Entry<RyaURI, Property> property : entry.getValue().entrySet()) {
- final RyaURI propertyKey = property.getKey();
+ for (final Entry<RyaIRI, ImmutableMap<RyaIRI, Property>> entry : entity.getProperties().entrySet()) {
+ for (final Entry<RyaIRI, Property> property : entry.getValue().entrySet()) {
+ final RyaIRI propertyKey = property.getKey();
final IRI iri = VF.createIRI(propertyKey.getData());
final Property propertyValue = property.getValue();
final Value value = RyaToRdfConversions.convertValue(propertyValue.getValue());
@@ -601,10 +601,10 @@
final IRI iri = entry.getKey();
final Value value = entry.getValue();
- final RyaURI ryaUri = new RyaURI(iri.stringValue());
+ final RyaIRI ryaIri = new RyaIRI(iri.stringValue());
final RyaType ryaType = RdfToRyaConversions.convertValue(value);
- final Property property = new Property(ryaUri, ryaType);
+ final Property property = new Property(ryaIri, ryaType);
properties.add(property);
}
return properties;
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/SmartUriStorage.java b/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/SmartUriStorage.java
index 03c2dbb..0c1650c 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/SmartUriStorage.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/SmartUriStorage.java
@@ -20,7 +20,7 @@
import java.util.Map;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Type;
import org.apache.rya.indexing.entity.model.TypedEntity;
@@ -35,12 +35,12 @@
public interface SmartUriStorage {
/**
* Stores the map into the datastore.
- * @param subject the {@link RyaURI} subject of the Entity. Identifies the
+ * @param subject the {@link RyaIRI} subject of the Entity. Identifies the
* thing that is being represented as an Entity.
* @param map the {@link Map} of {@link IRI}s to {@link Value}s.
* @throws SmartUriException
*/
- public void storeEntity(final RyaURI subject, final Map<IRI, Value> map) throws SmartUriException;
+ public void storeEntity(final RyaIRI subject, final Map<IRI, Value> map) throws SmartUriException;
/**
* Stores the entity into the datastore.
@@ -59,12 +59,12 @@
/**
* Queries for the entity based on the subject
- * @param subject the {@link RyaURI} subject of the Entity. Identifies the
+ * @param subject the {@link RyaIRI} subject of the Entity. Identifies the
* thing that is being represented as an Entity.
* @return the {@link Entity} matching the subject.
* @throws SmartUriException
*/
- public Entity queryEntity(final RyaURI subject) throws SmartUriException;
+ public Entity queryEntity(final RyaIRI subject) throws SmartUriException;
/**
* Queries the datastore for the map.
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/duplication/DuplicateDataDetector.java b/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/duplication/DuplicateDataDetector.java
index 1d17097..6ac6ab2 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/duplication/DuplicateDataDetector.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/smarturi/duplication/DuplicateDataDetector.java
@@ -36,7 +36,7 @@
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.lang.StringUtils;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.impl.DateTimeRyaTypeResolver;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
@@ -251,16 +251,16 @@
requireNonNull(entity2);
boolean allValuesNearlyEqual = true;
- final List<RyaURI> types1 = entity1.getExplicitTypeIds();
- final List<RyaURI> types2 = entity2.getExplicitTypeIds();
+ final List<RyaIRI> types1 = entity1.getExplicitTypeIds();
+ final List<RyaIRI> types2 = entity2.getExplicitTypeIds();
final boolean doBothHaveSameTypes = types1.containsAll(types2);
if (!doBothHaveSameTypes) {
return false;
}
- for (final Entry<RyaURI, ImmutableMap<RyaURI, Property>> entry : entity1.getProperties().entrySet()) {
- final RyaURI typeIdUri = entry.getKey();
- for (final Entry<RyaURI, Property> typeProperty : entry.getValue().entrySet()) {
- final RyaURI propertyNameUri = typeProperty.getKey();
+ for (final Entry<RyaIRI, ImmutableMap<RyaIRI, Property>> entry : entity1.getProperties().entrySet()) {
+ final RyaIRI typeIdUri = entry.getKey();
+ for (final Entry<RyaIRI, Property> typeProperty : entry.getValue().entrySet()) {
+ final RyaIRI propertyNameUri = typeProperty.getKey();
final Property property1 = typeProperty.getValue();
final Optional<Property> p2 = entity2.lookupTypeProperty(typeIdUri, propertyNameUri);
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/statement/metadata/matching/StatementMetadataExternalSetProvider.java b/extras/indexing/src/main/java/org/apache/rya/indexing/statement/metadata/matching/StatementMetadataExternalSetProvider.java
index 6571c83..8470a5d 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/statement/metadata/matching/StatementMetadataExternalSetProvider.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/statement/metadata/matching/StatementMetadataExternalSetProvider.java
@@ -27,7 +27,7 @@
import java.util.Set;
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.indexing.external.matching.ExternalSetProvider;
import org.apache.rya.indexing.external.matching.QuerySegment;
@@ -46,11 +46,11 @@
*/
public class StatementMetadataExternalSetProvider implements ExternalSetProvider<StatementMetadataNode<?>> {
- private List<RyaURI> expectedURI = Arrays.asList(RdfToRyaConversions.convertURI(OWLReify.SOURCE),
- RdfToRyaConversions.convertURI(OWLReify.PROPERTY), RdfToRyaConversions.convertURI(OWLReify.TARGET),
- RdfToRyaConversions.convertURI(RDF.TYPE));
+ private List<RyaIRI> expectedURI = Arrays.asList(RdfToRyaConversions.convertIRI(OWLReify.SOURCE),
+ RdfToRyaConversions.convertIRI(OWLReify.PROPERTY), RdfToRyaConversions.convertIRI(OWLReify.TARGET),
+ RdfToRyaConversions.convertIRI(RDF.TYPE));
private Multimap<Var, StatementPattern> reifiedQueries;
- private Set<RyaURI> metadataProperties;
+ private Set<RyaIRI> metadataProperties;
private RdfCloudTripleStoreConfiguration conf;
public StatementMetadataExternalSetProvider(RdfCloudTripleStoreConfiguration conf) {
@@ -102,7 +102,7 @@
for (StatementPattern pattern : patterns) {
Var var = pattern.getPredicateVar();
if (var.getValue() != null && var.getValue() instanceof IRI) {
- RyaURI uri = RdfToRyaConversions.convertURI((IRI) var.getValue());
+ RyaIRI uri = RdfToRyaConversions.convertIRI((IRI) var.getValue());
if(expectedURI.contains(uri) || metadataProperties.contains(uri)) {
finalPatterns.add(pattern);
}
diff --git a/extras/indexing/src/main/java/org/apache/rya/indexing/statement/metadata/matching/StatementMetadataNode.java b/extras/indexing/src/main/java/org/apache/rya/indexing/statement/metadata/matching/StatementMetadataNode.java
index 3d3b7ba..a5f8b3a 100644
--- a/extras/indexing/src/main/java/org/apache/rya/indexing/statement/metadata/matching/StatementMetadataNode.java
+++ b/extras/indexing/src/main/java/org/apache/rya/indexing/statement/metadata/matching/StatementMetadataNode.java
@@ -39,7 +39,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.RyaQueryEngine;
@@ -104,16 +104,16 @@
public class StatementMetadataNode<C extends RdfCloudTripleStoreConfiguration> extends ExternalSet
implements ExternalBatchingIterator {
- private static final RyaURI TYPE_ID_URI = new RyaURI(RDF.TYPE.toString());
- private static final RyaURI SUBJ_ID_URI = new RyaURI(OWLReify.SOURCE.toString());
- private static final RyaURI PRED_ID_URI = new RyaURI(OWLReify.PROPERTY.toString());
- private static final RyaURI OBJ_ID_URI = new RyaURI(OWLReify.TARGET.toString());
- private static final RyaURI STATEMENT_ID_URI = new RyaURI(OWLReify.ANNOTATION.toString());
+ private static final RyaIRI TYPE_ID_URI = new RyaIRI(RDF.TYPE.toString());
+ private static final RyaIRI SUBJ_ID_URI = new RyaIRI(OWLReify.SOURCE.toString());
+ private static final RyaIRI PRED_ID_URI = new RyaIRI(OWLReify.PROPERTY.toString());
+ private static final RyaIRI OBJ_ID_URI = new RyaIRI(OWLReify.TARGET.toString());
+ private static final RyaIRI STATEMENT_ID_URI = new RyaIRI(OWLReify.ANNOTATION.toString());
private StatementPattern statement;
- private Map<RyaURI, Var> properties;
+ private Map<RyaIRI, Var> properties;
private Collection<StatementPattern> patterns;
- private List<RyaURI> uriList = Arrays.asList(TYPE_ID_URI, SUBJ_ID_URI, PRED_ID_URI, OBJ_ID_URI);
+ private List<RyaIRI> uriList = Arrays.asList(TYPE_ID_URI, SUBJ_ID_URI, PRED_ID_URI, OBJ_ID_URI);
private C conf;
private Set<String> bindingNames;
private RyaQueryEngine<C> queryEngine;
@@ -206,7 +206,7 @@
Var context = null;
for (final StatementPattern pattern : patterns) {
- final RyaURI predicate = new RyaURI(pattern.getPredicateVar().getValue().toString());
+ final RyaIRI predicate = new RyaIRI(pattern.getPredicateVar().getValue().toString());
if (!contextSet) {
context = pattern.getContextVar();
@@ -218,7 +218,7 @@
}
if (predicate.equals(TYPE_ID_URI)) {
- final RyaURI statementID = new RyaURI(pattern.getObjectVar().getValue().stringValue());
+ final RyaIRI statementID = new RyaIRI(pattern.getObjectVar().getValue().stringValue());
if (statementID.equals(STATEMENT_ID_URI)) {
statementFound = true;
} else {
@@ -281,10 +281,10 @@
private void setStatementPatternAndProperties(Collection<StatementPattern> patterns) {
StatementPattern sp = new StatementPattern();
- Map<RyaURI, Var> properties = new HashMap<>();
+ Map<RyaIRI, Var> properties = new HashMap<>();
for (final StatementPattern pattern : patterns) {
- final RyaURI predicate = new RyaURI(pattern.getPredicateVar().getValue().toString());
+ final RyaIRI predicate = new RyaIRI(pattern.getPredicateVar().getValue().toString());
if (!uriList.contains(predicate)) {
Var objVar = pattern.getObjectVar();
@@ -355,19 +355,19 @@
Value predValue = getVarValue(statement.getPredicateVar(), bs);
Value objValue = getVarValue(statement.getObjectVar(), bs);
Value contextValue = getVarValue(statement.getContextVar(), bs);
- RyaURI subj = null;
- RyaURI pred = null;
+ RyaIRI subj = null;
+ RyaIRI pred = null;
RyaType obj = null;
- RyaURI context = null;
+ RyaIRI context = null;
if (subjValue != null) {
Preconditions.checkArgument(subjValue instanceof IRI);
- subj = RdfToRyaConversions.convertURI((IRI) subjValue);
+ subj = RdfToRyaConversions.convertIRI((IRI) subjValue);
}
if (predValue != null) {
Preconditions.checkArgument(predValue instanceof IRI);
- pred = RdfToRyaConversions.convertURI((IRI) predValue);
+ pred = RdfToRyaConversions.convertIRI((IRI) predValue);
}
if (objValue != null) {
@@ -375,7 +375,7 @@
}
if(contextValue != null) {
- context = RdfToRyaConversions.convertURI((IRI) contextValue);
+ context = RdfToRyaConversions.convertIRI((IRI) contextValue);
}
return new RyaStatement(subj, pred, obj, context);
}
@@ -480,7 +480,7 @@
* This is an {@link CloseableIteration} class that serves a number of
* purposes. It's primary purpose is to filter a CloseableIteration over
* {@link Map.Entry<RyaStatement,BindingSet>} using a specified property Map
- * from {@link RyaURI} to {@link org.eclipse.rdf4j.query.algebra.Var}. This
+ * from {@link RyaIRI} to {@link org.eclipse.rdf4j.query.algebra.Var}. This
* Iteration iterates over the Entries in the user specified Iteration,
* comparing properties in the {@link StatementMetadata} Map contained in
* the RyaStatements with the property Map for this class. If the properties
@@ -496,7 +496,7 @@
class PropertyFilterAndBindingSetJoinIteration implements CloseableIteration<BindingSet, QueryEvaluationException> {
private CloseableIteration<? extends Entry<RyaStatement, BindingSet>, RyaDAOException> statements;
- private Map<RyaURI, Var> properties;
+ private Map<RyaIRI, Var> properties;
private StatementPattern sp;
private BindingSet next;
private boolean hasNextCalled = false;
@@ -504,7 +504,7 @@
public PropertyFilterAndBindingSetJoinIteration(
CloseableIteration<? extends Entry<RyaStatement, BindingSet>, RyaDAOException> statements,
- Map<RyaURI, Var> properties, StatementPattern sp) {
+ Map<RyaIRI, Var> properties, StatementPattern sp) {
this.statements = statements;
this.properties = properties;
this.sp = sp;
@@ -631,13 +631,13 @@
*/
private Optional<BindingSet> buildPropertyBindingSet(RyaStatement statement) {
StatementMetadata metadata = statement.getMetadata();
- Map<RyaURI, RyaType> statementProps = metadata.getMetadata();
+ Map<RyaIRI, RyaType> statementProps = metadata.getMetadata();
if (statementProps.size() < properties.size()) {
return Optional.empty();
}
QueryBindingSet bs = new QueryBindingSet();
- for (Map.Entry<RyaURI, Var> entry : properties.entrySet()) {
- RyaURI key = entry.getKey();
+ for (Map.Entry<RyaIRI, Var> entry : properties.entrySet()) {
+ RyaIRI key = entry.getKey();
Var var = entry.getValue();
if (!statementProps.containsKey(key)) {
return Optional.empty();
diff --git a/extras/indexing/src/test/java/org/apache/rya/accumulo/documentIndex/DocumentIndexIntersectingIteratorTest.java b/extras/indexing/src/test/java/org/apache/rya/accumulo/documentIndex/DocumentIndexIntersectingIteratorTest.java
index 7108ae6..02ed887 100644
--- a/extras/indexing/src/test/java/org/apache/rya/accumulo/documentIndex/DocumentIndexIntersectingIteratorTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/accumulo/documentIndex/DocumentIndexIntersectingIteratorTest.java
@@ -41,7 +41,7 @@
import org.apache.rya.accumulo.RyaTableMutationsFactory;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaToRdfConversions;
@@ -1705,14 +1705,14 @@
for (int i = 0; i < 20; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaType(XMLSchema.STRING, "cq1"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaType(XMLSchema.STRING, "cq1"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
RyaStatement rs3 = null;
RyaStatement rs4 = null;
if(i == 5 || i == 15) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
- rs4 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.STRING,Integer.toString(i)));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
+ rs4 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.STRING,Integer.toString(i)));
}
@@ -1780,9 +1780,9 @@
RyaType rt1 = RdfToRyaConversions.convertValue(spList1.get(2).getObjectVar().getValue());
RyaType rt2 = RdfToRyaConversions.convertValue(spList2.get(2).getObjectVar().getValue());
- RyaURI predURI1 = (RyaURI) RdfToRyaConversions.convertValue(spList1.get(0).getPredicateVar().getValue());
- RyaURI predURI2 = (RyaURI) RdfToRyaConversions.convertValue(spList1.get(1).getPredicateVar().getValue());
- RyaURI predURI3 = (RyaURI) RdfToRyaConversions.convertValue(spList1.get(2).getPredicateVar().getValue());
+ RyaIRI predURI1 = (RyaIRI) RdfToRyaConversions.convertValue(spList1.get(0).getPredicateVar().getValue());
+ RyaIRI predURI2 = (RyaIRI) RdfToRyaConversions.convertValue(spList1.get(1).getPredicateVar().getValue());
+ RyaIRI predURI3 = (RyaIRI) RdfToRyaConversions.convertValue(spList1.get(2).getPredicateVar().getValue());
// System.out.println("to string" + spList1.get(2).getObjectVar().getValue().stringValue());
// System.out.println("converted obj" + rt1.getData());
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/AccumuloIndexingConfigurationTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/AccumuloIndexingConfigurationTest.java
index fcef816..d605fcd 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/AccumuloIndexingConfigurationTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/AccumuloIndexingConfigurationTest.java
@@ -30,7 +30,7 @@
import java.util.Set;
import org.apache.accumulo.core.security.Authorizations;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.junit.Test;
public class AccumuloIndexingConfigurationTest {
@@ -114,7 +114,7 @@
boolean useInference = true;
boolean displayPlan = false;
boolean useMetadata = true;
- Set<RyaURI> metaProperties = new HashSet<>(Arrays.asList(new RyaURI("urn:123"), new RyaURI("urn:456")));
+ Set<RyaIRI> metaProperties = new HashSet<>(Arrays.asList(new RyaIRI("urn:123"), new RyaIRI("urn:456")));
Properties props = new Properties();
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/entity/AccumuloDocIndexerTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/entity/AccumuloDocIndexerTest.java
index b25864e..a9f86b1 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/entity/AccumuloDocIndexerTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/entity/AccumuloDocIndexerTest.java
@@ -34,7 +34,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.api.resolver.RyaTripleContext;
import org.apache.rya.indexing.accumulo.ConfigUtils;
@@ -111,14 +111,14 @@
for (int i = 0; i < 20; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaType(XMLSchema.STRING, "cq1"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaType(XMLSchema.STRING, "cq1"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
RyaStatement rs3 = null;
RyaStatement rs4 = null;
if(i == 5 || i == 15) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
- rs4 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.STRING,Integer.toString(i)));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
+ rs4 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.STRING,Integer.toString(i)));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -246,13 +246,13 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:cq1"), new RyaURI("uri:cf1"), new RyaURI("uri:" + i ));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:cq1"), new RyaIRI("uri:cf1"), new RyaIRI("uri:" + i ));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
RyaStatement rs3 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -370,13 +370,13 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaType(XMLSchema.STRING, "cq1"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaType(XMLSchema.STRING, "cq1"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
RyaStatement rs3 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -484,13 +484,13 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaType(XMLSchema.STRING, "cq1"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaType(XMLSchema.STRING, "cq1"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
RyaStatement rs3 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -596,13 +596,13 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:cq1"), new RyaURI("uri:cf1"), new RyaURI("uri:" + i ));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:cq1"), new RyaIRI("uri:cf1"), new RyaIRI("uri:" + i ));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
RyaStatement rs3 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -710,13 +710,13 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:cq1"), new RyaURI("uri:cf1"), new RyaURI("uri:" + i ));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:cq1"), new RyaIRI("uri:cf1"), new RyaIRI("uri:" + i ));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"));
RyaStatement rs3 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -825,18 +825,18 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:cq1"), new RyaURI("uri:cf1"), new RyaURI("uri:" + i ), new RyaURI("uri:joe"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:joe"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:cq1"), new RyaIRI("uri:cf1"), new RyaIRI("uri:" + i ), new RyaIRI("uri:joe"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:joe"));
RyaStatement rs3 = null;
- RyaStatement rs4 = new RyaStatement(new RyaURI("uri:cq1"), new RyaURI("uri:cf1"), new RyaURI("uri:" + i ), new RyaURI("uri:hank"));
- RyaStatement rs5 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:hank"));
+ RyaStatement rs4 = new RyaStatement(new RyaIRI("uri:cq1"), new RyaIRI("uri:cf1"), new RyaIRI("uri:" + i ), new RyaIRI("uri:hank"));
+ RyaStatement rs5 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:hank"));
RyaStatement rs6 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:joe"));
- rs6 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:hank"));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:joe"));
+ rs6 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:hank"));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -1002,18 +1002,18 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:cq1"), new RyaURI("uri:cf1"), new RyaURI("uri:" + i ), new RyaURI("uri:joe"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:joe"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:cq1"), new RyaIRI("uri:cf1"), new RyaIRI("uri:" + i ), new RyaIRI("uri:joe"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:joe"));
RyaStatement rs3 = null;
- RyaStatement rs4 = new RyaStatement(new RyaURI("uri:cq1"), new RyaURI("uri:cf1"), new RyaURI("uri:" + i ), new RyaURI("uri:hank"));
- RyaStatement rs5 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:hank"));
+ RyaStatement rs4 = new RyaStatement(new RyaIRI("uri:cq1"), new RyaIRI("uri:cf1"), new RyaIRI("uri:" + i ), new RyaIRI("uri:hank"));
+ RyaStatement rs5 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:hank"));
RyaStatement rs6 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:joe"));
- rs6 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:hank"));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:joe"));
+ rs6 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:hank"));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -1176,18 +1176,18 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:joe"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:joe"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:joe"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:joe"));
RyaStatement rs3 = null;
- RyaStatement rs4 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:hank"));
- RyaStatement rs5 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:hank"));
+ RyaStatement rs4 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:hank"));
+ RyaStatement rs5 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:hank"));
RyaStatement rs6 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:joe"));
- rs6 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:hank"));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:joe"));
+ rs6 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:hank"));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -1356,18 +1356,18 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:joe"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:joe"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:joe"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:joe"));
RyaStatement rs3 = null;
- RyaStatement rs4 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:hank"));
- RyaStatement rs5 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:hank"));
+ RyaStatement rs4 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:hank"));
+ RyaStatement rs5 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:hank"));
RyaStatement rs6 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:joe"));
- rs6 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:hank"));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:joe"));
+ rs6 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:hank"));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -1538,18 +1538,18 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:joe"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:joe"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:joe"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:joe"));
RyaStatement rs3 = null;
- RyaStatement rs4 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:hank"));
- RyaStatement rs5 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:hank"));
+ RyaStatement rs4 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:hank"));
+ RyaStatement rs5 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:hank"));
RyaStatement rs6 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:joe"));
- rs6 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:hank"));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:joe"));
+ rs6 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:hank"));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -1717,12 +1717,12 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:joe"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:joe"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:joe"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:joe"));
RyaStatement rs3 = null;
- RyaStatement rs4 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:hank"));
- RyaStatement rs5 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:hank"));
+ RyaStatement rs4 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:hank"));
+ RyaStatement rs5 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:hank"));
RyaStatement rs6 = null;
RyaStatement rs7 = null;
@@ -1730,10 +1730,10 @@
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:joe"));
- rs6 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:hank"));
- rs7 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(100+i)), new RyaURI("uri:joe"));
- rs8 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(100+i)), new RyaURI("uri:hank"));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:joe"));
+ rs6 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:hank"));
+ rs7 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(100+i)), new RyaIRI("uri:joe"));
+ rs8 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(100+i)), new RyaIRI("uri:hank"));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
@@ -1923,18 +1923,18 @@
for (int i = 0; i < 30; i++) {
- RyaStatement rs1 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:joe"));
- RyaStatement rs2 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:joe"));
+ RyaStatement rs1 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:joe"));
+ RyaStatement rs2 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:joe"));
RyaStatement rs3 = null;
- RyaStatement rs4 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf1"), new RyaURI("uri:cq1"), new RyaURI("uri:hank"));
- RyaStatement rs5 = new RyaStatement(new RyaURI("uri:" + i ), new RyaURI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaURI("uri:hank"));
+ RyaStatement rs4 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf1"), new RyaIRI("uri:cq1"), new RyaIRI("uri:hank"));
+ RyaStatement rs5 = new RyaStatement(new RyaIRI("uri:" + i ), new RyaIRI("uri:cf2"), new RyaType(XMLSchema.STRING, "cq2"), new RyaIRI("uri:hank"));
RyaStatement rs6 = null;
if(i == 5 || i == 10 || i == 15 || i == 20 || i == 25) {
- rs3 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:joe"));
- rs6 = new RyaStatement(new RyaURI("uri:" +i ), new RyaURI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaURI("uri:hank"));
+ rs3 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:joe"));
+ rs6 = new RyaStatement(new RyaIRI("uri:" +i ), new RyaIRI("uri:cf3"), new RyaType(XMLSchema.INTEGER,Integer.toString(i)), new RyaIRI("uri:hank"));
}
Map<RdfCloudTripleStoreConstants.TABLE_LAYOUT, Collection<Mutation>> serialize1 = rtm.serialize(rs1);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/entity/EntityCentricIndexTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/entity/EntityCentricIndexTest.java
index 79fd2c2..3111510 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/entity/EntityCentricIndexTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/entity/EntityCentricIndexTest.java
@@ -30,7 +30,7 @@
import org.apache.accumulo.core.security.ColumnVisibility;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaContext;
import org.apache.rya.api.resolver.RyaTypeResolverException;
import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
@@ -72,10 +72,10 @@
DELIM_BYTES, subjectStr.getBytes(), objectBytes[1]),
visibilityBytes, timestamp);
ryaStatement = new RyaStatement(
- new RyaURI(subjectStr),
- new RyaURI(predicateStr),
+ new RyaIRI(subjectStr),
+ new RyaIRI(predicateStr),
new RyaType(XMLSchema.INTEGER, "3"),
- new RyaURI(contextStr),
+ new RyaIRI(contextStr),
null, visibilityBytes, valueBytes, timestamp);
value = new Value(valueBytes);
}
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/freetext/AccumuloFreeTextIndexerTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/freetext/AccumuloFreeTextIndexerTest.java
index 62396e4..f6c29a4 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/freetext/AccumuloFreeTextIndexerTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/accumulo/freetext/AccumuloFreeTextIndexerTest.java
@@ -35,7 +35,7 @@
import org.apache.rya.accumulo.AccumuloRdfConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.indexing.StatementConstraints;
@@ -191,20 +191,20 @@
f.init();
// These should not be stored because they are not in the predicate list
- f.storeStatement(new RyaStatement(new RyaURI("foo:subj1"), new RyaURI(RDFS.LABEL.toString()), new RyaType("invalid")));
- f.storeStatement(new RyaStatement(new RyaURI("foo:subj2"), new RyaURI(RDFS.COMMENT.toString()), new RyaType("invalid")));
+ f.storeStatement(new RyaStatement(new RyaIRI("foo:subj1"), new RyaIRI(RDFS.LABEL.toString()), new RyaType("invalid")));
+ f.storeStatement(new RyaStatement(new RyaIRI("foo:subj2"), new RyaIRI(RDFS.COMMENT.toString()), new RyaType("invalid")));
- RyaURI pred1 = new RyaURI("pred:1");
- RyaURI pred2 = new RyaURI("pred:2");
+ RyaIRI pred1 = new RyaIRI("pred:1");
+ RyaIRI pred2 = new RyaIRI("pred:2");
// These should be stored because they are in the predicate list
- RyaStatement s3 = new RyaStatement(new RyaURI("foo:subj3"), pred1, new RyaType("valid"));
- RyaStatement s4 = new RyaStatement(new RyaURI("foo:subj4"), pred2, new RyaType("valid"));
+ RyaStatement s3 = new RyaStatement(new RyaIRI("foo:subj3"), pred1, new RyaType("valid"));
+ RyaStatement s4 = new RyaStatement(new RyaIRI("foo:subj4"), pred2, new RyaType("valid"));
f.storeStatement(s3);
f.storeStatement(s4);
// This should not be stored because the object is not a literal
- f.storeStatement(new RyaStatement(new RyaURI("foo:subj5"), pred1, new RyaURI("in:valid")));
+ f.storeStatement(new RyaStatement(new RyaIRI("foo:subj5"), pred1, new RyaIRI("in:valid")));
f.flush();
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/query/EntityQueryNodeIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/query/EntityQueryNodeIT.java
index c5b7fa1..833858a 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/query/EntityQueryNodeIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/query/EntityQueryNodeIT.java
@@ -26,7 +26,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.VarNameUtils;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.indexing.entity.model.Entity;
@@ -56,18 +56,18 @@
public class EntityQueryNodeIT extends MongoITBase {
private static final Type PERSON_TYPE =
- new Type(new RyaURI("urn:person"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:name"))
- .add(new RyaURI("urn:age"))
- .add(new RyaURI("urn:eye"))
+ new Type(new RyaIRI("urn:person"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:name"))
+ .add(new RyaIRI("urn:age"))
+ .add(new RyaIRI("urn:eye"))
.build());
private static final Type EMPLOYEE_TYPE =
- new Type(new RyaURI("urn:employee"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:name"))
- .add(new RyaURI("urn:hoursPerWeek"))
+ new Type(new RyaIRI("urn:employee"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:name"))
+ .add(new RyaIRI("urn:hoursPerWeek"))
.build());
@Test(expected = IllegalStateException.class)
@@ -154,13 +154,13 @@
public void evaluate_constantSubject() throws Exception {
final EntityStorage storage = new MongoEntityStorage(super.getMongoClient(), "testDB");
final ValueFactory vf = SimpleValueFactory.getInstance();
- final RyaURI subject = new RyaURI("urn:SSN:111-11-1111");
+ final RyaIRI subject = new RyaIRI("urn:SSN:111-11-1111");
final Entity entity = Entity.builder()
.setSubject(subject)
.setExplicitType(PERSON_TYPE.getId())
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:age"), RdfToRyaConversions.convertLiteral(vf.createLiteral(BigInteger.valueOf(20)))))
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:eye"), RdfToRyaConversions.convertLiteral(vf.createLiteral("blue"))))
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:name"), RdfToRyaConversions.convertLiteral(vf.createLiteral("Bob"))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:age"), RdfToRyaConversions.convertLiteral(vf.createLiteral(BigInteger.valueOf(20)))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:eye"), RdfToRyaConversions.convertLiteral(vf.createLiteral("blue"))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:name"), RdfToRyaConversions.convertLiteral(vf.createLiteral("Bob"))))
.build();
storage.create(entity);
@@ -189,22 +189,22 @@
public void evaluate_variableSubject() throws Exception {
final EntityStorage storage = new MongoEntityStorage(super.getMongoClient(), "testDB");
final ValueFactory vf = SimpleValueFactory.getInstance();
- RyaURI subject = new RyaURI("urn:SSN:111-11-1111");
+ RyaIRI subject = new RyaIRI("urn:SSN:111-11-1111");
final Entity bob = Entity.builder()
.setSubject(subject)
.setExplicitType(PERSON_TYPE.getId())
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:age"), RdfToRyaConversions.convertLiteral(vf.createLiteral(BigInteger.valueOf(20)))))
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:eye"), RdfToRyaConversions.convertLiteral(vf.createLiteral("blue"))))
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:name"), RdfToRyaConversions.convertLiteral(vf.createLiteral("Bob"))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:age"), RdfToRyaConversions.convertLiteral(vf.createLiteral(BigInteger.valueOf(20)))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:eye"), RdfToRyaConversions.convertLiteral(vf.createLiteral("blue"))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:name"), RdfToRyaConversions.convertLiteral(vf.createLiteral("Bob"))))
.build();
- subject = new RyaURI("urn:SSN:222-22-2222");
+ subject = new RyaIRI("urn:SSN:222-22-2222");
final Entity fred = Entity.builder()
.setSubject(subject)
.setExplicitType(PERSON_TYPE.getId())
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:age"), RdfToRyaConversions.convertLiteral(vf.createLiteral(BigInteger.valueOf(25)))))
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:eye"), RdfToRyaConversions.convertLiteral(vf.createLiteral("brown"))))
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:name"), RdfToRyaConversions.convertLiteral(vf.createLiteral("Fred"))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:age"), RdfToRyaConversions.convertLiteral(vf.createLiteral(BigInteger.valueOf(25)))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:eye"), RdfToRyaConversions.convertLiteral(vf.createLiteral("brown"))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:name"), RdfToRyaConversions.convertLiteral(vf.createLiteral("Fred"))))
.build();
storage.create(bob);
@@ -242,13 +242,13 @@
public void evaluate_constantObject() throws Exception {
final EntityStorage storage = new MongoEntityStorage(super.getMongoClient(), "testDB");
final ValueFactory vf = SimpleValueFactory.getInstance();
- final RyaURI subject = new RyaURI("urn:SSN:111-11-1111");
+ final RyaIRI subject = new RyaIRI("urn:SSN:111-11-1111");
final Entity entity = Entity.builder()
.setSubject(subject)
.setExplicitType(PERSON_TYPE.getId())
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:age"), RdfToRyaConversions.convertLiteral(vf.createLiteral(BigInteger.valueOf(20)))))
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:eye"), RdfToRyaConversions.convertLiteral(vf.createLiteral("blue"))))
- .setProperty(PERSON_TYPE.getId(), new Property(new RyaURI("urn:name"), RdfToRyaConversions.convertLiteral(vf.createLiteral("Bob"))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:age"), RdfToRyaConversions.convertLiteral(vf.createLiteral(BigInteger.valueOf(20)))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:eye"), RdfToRyaConversions.convertLiteral(vf.createLiteral("blue"))))
+ .setProperty(PERSON_TYPE.getId(), new Property(new RyaIRI("urn:name"), RdfToRyaConversions.convertLiteral(vf.createLiteral("Bob"))))
.build();
storage.create(entity);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/EntityDocumentConverterTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/EntityDocumentConverterTest.java
index b124470..bdc67ae 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/EntityDocumentConverterTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/EntityDocumentConverterTest.java
@@ -21,7 +21,7 @@
import static org.junit.Assert.assertEquals;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
import org.apache.rya.indexing.entity.storage.mongo.DocumentConverter.DocumentConverterException;
@@ -38,14 +38,14 @@
public void to_and_from_document() throws DocumentConverterException {
// Convert an Entity into a Document.
final Entity entity = Entity.builder()
- .setSubject(new RyaURI("urn:alice"))
+ .setSubject(new RyaIRI("urn:alice"))
// Add some explicily typed properties.
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType("blue")))
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType("blue")))
// Add some implicitly typed properties.
- .setProperty(new RyaURI("urn:employee"), new Property(new RyaURI("urn:hours"), new RyaType(XMLSchema.INT, "40")))
- .setProperty(new RyaURI("urn:employee"), new Property(new RyaURI("urn:employer"), new RyaType("Burger Joint")))
+ .setProperty(new RyaIRI("urn:employee"), new Property(new RyaIRI("urn:hours"), new RyaType(XMLSchema.INT, "40")))
+ .setProperty(new RyaIRI("urn:employee"), new Property(new RyaIRI("urn:employer"), new RyaType("Burger Joint")))
.build();
final Document document = new EntityDocumentConverter().toDocument(entity);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/MongoEntityStorageIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/MongoEntityStorageIT.java
index cec989e..67595a9 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/MongoEntityStorageIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/MongoEntityStorageIT.java
@@ -27,7 +27,7 @@
import java.util.Set;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
import org.apache.rya.indexing.entity.model.Type;
@@ -54,10 +54,10 @@
public void create_and_get() throws Exception {
// An Entity that will be stored.
final Entity entity = Entity.builder()
- .setSubject(new RyaURI("urn:GTIN-14/00012345600012"))
- .setExplicitType(new RyaURI("urn:icecream"))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
+ .setSubject(new RyaIRI("urn:GTIN-14/00012345600012"))
+ .setExplicitType(new RyaIRI("urn:icecream"))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
.build();
// Create it.
@@ -65,7 +65,7 @@
storage.create(entity);
// Get it.
- final Optional<Entity> storedEntity = storage.get(new RyaURI("urn:GTIN-14/00012345600012"));
+ final Optional<Entity> storedEntity = storage.get(new RyaIRI("urn:GTIN-14/00012345600012"));
// Verify the correct value was returned.
assertEquals(entity, storedEntity.get());
@@ -75,10 +75,10 @@
public void can_not_create_with_same_subject() throws Exception {
// A Type that will be stored.
final Entity entity = Entity.builder()
- .setSubject(new RyaURI("urn:GTIN-14/00012345600012"))
- .setExplicitType(new RyaURI("urn:icecream"))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
+ .setSubject(new RyaIRI("urn:GTIN-14/00012345600012"))
+ .setExplicitType(new RyaIRI("urn:icecream"))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
.build();
// Create it.
@@ -99,7 +99,7 @@
public void get_noneExisting() throws Exception {
// Get a Type that hasn't been created.
final EntityStorage storage = new MongoEntityStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
- final Optional<Entity> storedEntity = storage.get(new RyaURI("urn:GTIN-14/00012345600012"));
+ final Optional<Entity> storedEntity = storage.get(new RyaIRI("urn:GTIN-14/00012345600012"));
// Verify nothing was returned.
assertFalse(storedEntity.isPresent());
@@ -109,10 +109,10 @@
public void delete() throws Exception {
// An Entity that will be stored.
final Entity entity = Entity.builder()
- .setSubject(new RyaURI("urn:GTIN-14/00012345600012"))
- .setExplicitType(new RyaURI("urn:icecream"))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
+ .setSubject(new RyaIRI("urn:GTIN-14/00012345600012"))
+ .setExplicitType(new RyaIRI("urn:icecream"))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
.build();
// Create it.
@@ -120,7 +120,7 @@
storage.create(entity);
// Delete it.
- final boolean deleted = storage.delete( new RyaURI("urn:GTIN-14/00012345600012") );
+ final boolean deleted = storage.delete( new RyaIRI("urn:GTIN-14/00012345600012") );
// Verify a document was deleted.
assertTrue( deleted );
@@ -130,7 +130,7 @@
public void delete_nonExisting() throws Exception {
// Delete an Entity that has not been created.
final EntityStorage storage = new MongoEntityStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
- final boolean deleted = storage.delete( new RyaURI("urn:GTIN-14/00012345600012") );
+ final boolean deleted = storage.delete( new RyaIRI("urn:GTIN-14/00012345600012") );
// Verify no document was deleted.
assertFalse( deleted );
@@ -141,50 +141,50 @@
final EntityStorage storage = new MongoEntityStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
// The Type we will search by.
- final Type icecreamType = new Type(new RyaURI("urn:icecream"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:brand"))
- .add(new RyaURI("urn:flavor"))
- .add(new RyaURI("urn:cost"))
+ final Type icecreamType = new Type(new RyaIRI("urn:icecream"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:brand"))
+ .add(new RyaIRI("urn:flavor"))
+ .add(new RyaIRI("urn:cost"))
.build());
// Some Person typed entities.
final Entity alice = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/111-11-1111") )
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setSubject( new RyaIRI("urn:SSN/111-11-1111") )
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.build();
final Entity bob = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/222-22-2222") )
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "57")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setSubject( new RyaIRI("urn:SSN/222-22-2222") )
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "57")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.build();
// Some Icecream typed objects.
final Entity chocolateIcecream = Entity.builder()
- .setSubject(new RyaURI("urn:GTIN-14/00012345600012"))
- .setExplicitType(new RyaURI("urn:icecream"))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
+ .setSubject(new RyaIRI("urn:GTIN-14/00012345600012"))
+ .setExplicitType(new RyaIRI("urn:icecream"))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:flavor"), new RyaType(XMLSchema.STRING, "Chocolate")))
.build();
final Entity vanillaIcecream = Entity.builder()
- .setSubject( new RyaURI("urn:GTIN-14/22356325213432") )
- .setExplicitType(new RyaURI("urn:icecream"))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:flavor"), new RyaType(XMLSchema.STRING, "Vanilla")))
+ .setSubject( new RyaIRI("urn:GTIN-14/22356325213432") )
+ .setExplicitType(new RyaIRI("urn:icecream"))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:flavor"), new RyaType(XMLSchema.STRING, "Vanilla")))
.build();
final Entity strawberryIcecream = Entity.builder()
- .setSubject( new RyaURI("urn:GTIN-14/77544325436721") )
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
- .setProperty(new RyaURI("urn:icecream"), new Property(new RyaURI("urn:flavor"), new RyaType(XMLSchema.STRING, "Strawberry")))
+ .setSubject( new RyaIRI("urn:GTIN-14/77544325436721") )
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:brand"), new RyaType(XMLSchema.STRING, "Awesome Icecream")))
+ .setProperty(new RyaIRI("urn:icecream"), new Property(new RyaIRI("urn:flavor"), new RyaType(XMLSchema.STRING, "Strawberry")))
.build();
// Create the objects in the storage.
@@ -204,8 +204,8 @@
// Verify the expected results were returned.
final Set<TypedEntity> expected = Sets.newHashSet(
- chocolateIcecream.makeTypedEntity(new RyaURI("urn:icecream")).get(),
- vanillaIcecream.makeTypedEntity(new RyaURI("urn:icecream")).get());
+ chocolateIcecream.makeTypedEntity(new RyaIRI("urn:icecream")).get(),
+ vanillaIcecream.makeTypedEntity(new RyaIRI("urn:icecream")).get());
assertEquals(expected, objects);
}
@@ -214,67 +214,67 @@
final EntityStorage storage = new MongoEntityStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
// A Type that defines a Person.
- final Type personType = new Type(new RyaURI("urn:person"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:name"))
- .add(new RyaURI("urn:age"))
- .add(new RyaURI("urn:eye"))
+ final Type personType = new Type(new RyaIRI("urn:person"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:name"))
+ .add(new RyaIRI("urn:age"))
+ .add(new RyaIRI("urn:eye"))
.build());
// Some Person typed objects.
final Entity alice = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/111-11-1111") )
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setSubject( new RyaIRI("urn:SSN/111-11-1111") )
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.build();
final Entity bob = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/222-22-2222") )
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "57")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setSubject( new RyaIRI("urn:SSN/222-22-2222") )
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "57")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.build();
final Entity charlie = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/333-33-3333") )
- .setExplicitType( new RyaURI("urn:person") )
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Charlie")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setSubject( new RyaIRI("urn:SSN/333-33-3333") )
+ .setExplicitType( new RyaIRI("urn:person") )
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Charlie")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.build();
final Entity david = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/444-44-4444") )
- .setExplicitType( new RyaURI("urn:person") )
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "David")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "brown")))
+ .setSubject( new RyaIRI("urn:SSN/444-44-4444") )
+ .setExplicitType( new RyaIRI("urn:person") )
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "David")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "brown")))
.build();
final Entity eve = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/555-55-5555") )
- .setExplicitType( new RyaURI("urn:person") )
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Eve")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setSubject( new RyaIRI("urn:SSN/555-55-5555") )
+ .setExplicitType( new RyaIRI("urn:person") )
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Eve")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
.build();
final Entity frank = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/666-66-6666") )
- .setExplicitType( new RyaURI("urn:person") )
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Frank")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
- .setProperty(new RyaURI("urn:someOtherType"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setSubject( new RyaIRI("urn:SSN/666-66-6666") )
+ .setExplicitType( new RyaIRI("urn:person") )
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Frank")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setProperty(new RyaIRI("urn:someOtherType"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
.build();
final Entity george = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/777-77-7777") )
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "George")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setSubject( new RyaIRI("urn:SSN/777-77-7777") )
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "George")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.build();
// Create the objects in the storage.
@@ -290,8 +290,8 @@
final Set<TypedEntity> objects = new HashSet<>();
final Set<Property> searchValues = Sets.newHashSet(
- new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")),
- new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")));
+ new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")),
+ new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")));
try(final ConvertingCursor<TypedEntity> it = storage.search(Optional.empty(), personType, searchValues)) {
while(it.hasNext()) {
@@ -301,8 +301,8 @@
// Verify the expected results were returned.
assertEquals(2, objects.size());
- assertTrue(objects.contains(alice.makeTypedEntity(new RyaURI("urn:person")).get()));
- assertTrue(objects.contains(charlie.makeTypedEntity(new RyaURI("urn:person")).get()));
+ assertTrue(objects.contains(alice.makeTypedEntity(new RyaIRI("urn:person")).get()));
+ assertTrue(objects.contains(charlie.makeTypedEntity(new RyaIRI("urn:person")).get()));
}
@Test
@@ -311,29 +311,29 @@
// Store Alice in the repository.
final Entity alice = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/111-11-1111") )
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setSubject( new RyaIRI("urn:SSN/111-11-1111") )
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.build();
storage.create(alice);
// Show Alice was stored.
- Optional<Entity> latest = storage.get(new RyaURI("urn:SSN/111-11-1111"));
+ Optional<Entity> latest = storage.get(new RyaIRI("urn:SSN/111-11-1111"));
assertEquals(alice, latest.get());
// Change Alice's eye color to brown.
final Entity updated = Entity.builder(alice)
.setVersion(latest.get().getVersion() + 1)
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "brown")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "brown")))
.build();
storage.update(alice, updated);
// Fetch the Alice object and ensure it has the new value.
- latest = storage.get(new RyaURI("urn:SSN/111-11-1111"));
+ latest = storage.get(new RyaIRI("urn:SSN/111-11-1111"));
assertEquals(updated, latest.get());
}
@@ -344,17 +344,17 @@
// Store Alice in the repository.
final Entity alice = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/111-11-1111") )
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setSubject( new RyaIRI("urn:SSN/111-11-1111") )
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.build();
storage.create(alice);
// Show Alice was stored.
- final Optional<Entity> latest = storage.get(new RyaURI("urn:SSN/111-11-1111"));
+ final Optional<Entity> latest = storage.get(new RyaIRI("urn:SSN/111-11-1111"));
assertEquals(alice, latest.get());
// Create the wrong old state and try to change Alice's eye color to brown.
@@ -364,7 +364,7 @@
final Entity updated = Entity.builder(alice)
.setVersion(501)
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "brown")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "brown")))
.build();
storage.update(wrongOld, updated);
@@ -374,13 +374,13 @@
public void update_differentSubjects() throws Exception {
// Two objects that do not have the same Subjects.
final Entity old = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/111-11-1111") )
- .setExplicitType( new RyaURI("urn:person") )
+ .setSubject( new RyaIRI("urn:SSN/111-11-1111") )
+ .setExplicitType( new RyaIRI("urn:person") )
.build();
final Entity updated = Entity.builder()
- .setSubject( new RyaURI("urn:SSN/222-22-2222") )
- .setExplicitType( new RyaURI("urn:person") )
+ .setSubject( new RyaIRI("urn:SSN/222-22-2222") )
+ .setExplicitType( new RyaIRI("urn:person") )
.build();
// The update will fail.
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/MongoTypeStorageIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/MongoTypeStorageIT.java
index 8212dbf..d3342c0 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/MongoTypeStorageIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/MongoTypeStorageIT.java
@@ -26,7 +26,7 @@
import java.util.Optional;
import java.util.Set;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Type;
import org.apache.rya.indexing.entity.storage.TypeStorage;
import org.apache.rya.indexing.entity.storage.TypeStorage.TypeStorageException;
@@ -46,11 +46,11 @@
@Test
public void create_and_get() throws TypeStorageException {
// A Type that will be stored.
- final Type type = new Type(new RyaURI("urn:icecream"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:brand"))
- .add(new RyaURI("urn:flavor"))
- .add(new RyaURI("urn:cost"))
+ final Type type = new Type(new RyaIRI("urn:icecream"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:brand"))
+ .add(new RyaIRI("urn:flavor"))
+ .add(new RyaIRI("urn:cost"))
.build());
// Create it.
@@ -58,7 +58,7 @@
storage.create(type);
// Get it.
- final Optional<Type> storedType = storage.get(new RyaURI("urn:icecream"));
+ final Optional<Type> storedType = storage.get(new RyaIRI("urn:icecream"));
// Verify the correct value was returned.
assertEquals(type, storedType.get());
@@ -67,11 +67,11 @@
@Test
public void can_not_create_with_same_id() throws TypeStorageException {
// A Type that will be stored.
- final Type type = new Type(new RyaURI("urn:icecream"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:brand"))
- .add(new RyaURI("urn:flavor"))
- .add(new RyaURI("urn:cost"))
+ final Type type = new Type(new RyaIRI("urn:icecream"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:brand"))
+ .add(new RyaIRI("urn:flavor"))
+ .add(new RyaIRI("urn:cost"))
.build());
// Create it.
@@ -92,7 +92,7 @@
public void get_nonexisting() throws TypeStorageException {
// Get a Type that hasn't been created.
final TypeStorage storage = new MongoTypeStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
- final Optional<Type> storedType = storage.get(new RyaURI("urn:icecream"));
+ final Optional<Type> storedType = storage.get(new RyaIRI("urn:icecream"));
// Verify nothing was returned.
assertFalse(storedType.isPresent());
@@ -101,11 +101,11 @@
@Test
public void delete() throws TypeStorageException {
// An Type that will be stored.
- final Type type = new Type(new RyaURI("urn:icecream"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:brand"))
- .add(new RyaURI("urn:flavor"))
- .add(new RyaURI("urn:cost"))
+ final Type type = new Type(new RyaIRI("urn:icecream"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:brand"))
+ .add(new RyaIRI("urn:flavor"))
+ .add(new RyaIRI("urn:cost"))
.build());
// Create it.
@@ -113,7 +113,7 @@
storage.create(type);
// Delete it.
- final boolean deleted = storage.delete( new RyaURI("urn:icecream") );
+ final boolean deleted = storage.delete( new RyaIRI("urn:icecream") );
// Verify a document was deleted.
assertTrue( deleted );
@@ -123,7 +123,7 @@
public void delete_nonexisting() throws TypeStorageException {
// Delete an Type that has not been created.
final TypeStorage storage = new MongoTypeStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
- final boolean deleted = storage.delete( new RyaURI("urn:icecream") );
+ final boolean deleted = storage.delete( new RyaIRI("urn:icecream") );
// Verify no document was deleted.
assertFalse( deleted );
@@ -132,25 +132,25 @@
@Test
public void search() throws Exception {
// Add some Types to the storage.
- final Type cat = new Type(new RyaURI("urn:cat"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:numLegs"))
- .add(new RyaURI("urn:eye"))
- .add(new RyaURI("urn:species"))
+ final Type cat = new Type(new RyaIRI("urn:cat"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:numLegs"))
+ .add(new RyaIRI("urn:eye"))
+ .add(new RyaIRI("urn:species"))
.build());
- final Type dog = new Type(new RyaURI("urn:dog"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:numLegs"))
- .add(new RyaURI("urn:eye"))
- .add(new RyaURI("urn:species"))
+ final Type dog = new Type(new RyaIRI("urn:dog"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:numLegs"))
+ .add(new RyaIRI("urn:eye"))
+ .add(new RyaIRI("urn:species"))
.build());
- final Type icecream = new Type(new RyaURI("urn:icecream"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:brand"))
- .add(new RyaURI("urn:flavor"))
- .add(new RyaURI("urn:cost"))
+ final Type icecream = new Type(new RyaIRI("urn:icecream"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:brand"))
+ .add(new RyaIRI("urn:flavor"))
+ .add(new RyaIRI("urn:cost"))
.build());
final TypeStorage storage = new MongoTypeStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
@@ -159,7 +159,7 @@
storage.create(icecream);
// Search for all Types that have the 'urn:eye' property.
- final ConvertingCursor<Type> typeIt = storage.search(new RyaURI("urn:eye"));
+ final ConvertingCursor<Type> typeIt = storage.search(new RyaIRI("urn:eye"));
final Set<Type> types = new HashSet<>();
while(typeIt.hasNext()) {
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverterTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverterTest.java
index 4c795c2..6c8c1d4 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverterTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/storage/mongo/TypeDocumentConverterTest.java
@@ -20,7 +20,7 @@
import static org.junit.Assert.assertEquals;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Type;
import org.apache.rya.indexing.entity.storage.mongo.DocumentConverter.DocumentConverterException;
import org.bson.Document;
@@ -37,11 +37,11 @@
@Test
public void toDocument() {
// Convert a Type into a Document.
- final Type type = new Type(new RyaURI("urn:icecream"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:brand"))
- .add(new RyaURI("urn:flavor"))
- .add(new RyaURI("urn:cost"))
+ final Type type = new Type(new RyaIRI("urn:icecream"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:brand"))
+ .add(new RyaIRI("urn:flavor"))
+ .add(new RyaIRI("urn:cost"))
.build());
final Document document = new TypeDocumentConverter().toDocument(type);
@@ -61,11 +61,11 @@
final Type type = new TypeDocumentConverter().fromDocument(document);
// Show the converted value has the expected structure.
- final Type expected = new Type(new RyaURI("urn:icecream"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:brand"))
- .add(new RyaURI("urn:flavor"))
- .add(new RyaURI("urn:cost"))
+ final Type expected = new Type(new RyaIRI("urn:icecream"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:brand"))
+ .add(new RyaIRI("urn:flavor"))
+ .add(new RyaIRI("urn:cost"))
.build());
assertEquals(expected, type);
}
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/update/mongo/MongoEntityIndexerIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/update/mongo/MongoEntityIndexerIT.java
index dd1644b..b9e74bc 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/entity/update/mongo/MongoEntityIndexerIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/entity/update/mongo/MongoEntityIndexerIT.java
@@ -24,7 +24,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
import org.apache.rya.indexing.entity.model.Type;
@@ -46,18 +46,18 @@
public class MongoEntityIndexerIT extends MongoITBase {
private static final Type PERSON_TYPE =
- new Type(new RyaURI("urn:person"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:name"))
- .add(new RyaURI("urn:age"))
- .add(new RyaURI("urn:eye"))
+ new Type(new RyaIRI("urn:person"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:name"))
+ .add(new RyaIRI("urn:age"))
+ .add(new RyaIRI("urn:eye"))
.build());
private static final Type EMPLOYEE_TYPE =
- new Type(new RyaURI("urn:employee"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:name"))
- .add(new RyaURI("urn:hoursPerWeek"))
+ new Type(new RyaIRI("urn:employee"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:name"))
+ .add(new RyaIRI("urn:hoursPerWeek"))
.build());
@Test
@@ -70,16 +70,16 @@
types.create(PERSON_TYPE);
// Index a RyaStatement that will create an Entity with an explicit type.
- final RyaStatement statement = new RyaStatement(new RyaURI("urn:SSN/111-11-1111"), new RyaURI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person"));
+ final RyaStatement statement = new RyaStatement(new RyaIRI("urn:SSN/111-11-1111"), new RyaIRI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person"));
indexer.storeStatement(statement);
// Fetch the Entity from storage and ensure it looks correct.
final EntityStorage entities = new MongoEntityStorage(getMongoClient(), conf.getRyaInstanceName());
- final Entity entity = entities.get(new RyaURI("urn:SSN/111-11-1111")).get();
+ final Entity entity = entities.get(new RyaIRI("urn:SSN/111-11-1111")).get();
final Entity expected = Entity.builder()
- .setSubject(new RyaURI("urn:SSN/111-11-1111"))
- .setExplicitType(new RyaURI("urn:person"))
+ .setSubject(new RyaIRI("urn:SSN/111-11-1111"))
+ .setExplicitType(new RyaIRI("urn:person"))
.build();
assertEquals(expected, entity);
@@ -97,17 +97,17 @@
types.create(EMPLOYEE_TYPE);
// Index a RyaStatement that will create an Entity with two implicit types.
- final RyaStatement statement = new RyaStatement(new RyaURI("urn:SSN/111-11-1111"), new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice"));
+ final RyaStatement statement = new RyaStatement(new RyaIRI("urn:SSN/111-11-1111"), new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice"));
indexer.storeStatement(statement);
// Fetch the Entity from storage and ensure it looks correct.
final EntityStorage entities = new MongoEntityStorage(getMongoClient(), conf.getRyaInstanceName());
- final Entity entity = entities.get(new RyaURI("urn:SSN/111-11-1111")).get();
+ final Entity entity = entities.get(new RyaIRI("urn:SSN/111-11-1111")).get();
final Entity expected = Entity.builder()
- .setSubject(new RyaURI("urn:SSN/111-11-1111"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
- .setProperty(new RyaURI("urn:employee"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setSubject(new RyaIRI("urn:SSN/111-11-1111"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:employee"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
.build();
assertEquals(expected, entity);
@@ -125,23 +125,23 @@
types.create(EMPLOYEE_TYPE);
// Index a bunch of RyaStatements.
- final RyaURI aliceSSN = new RyaURI("urn:SSN/111-11-1111");
- indexer.storeStatement(new RyaStatement(aliceSSN, new RyaURI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")));
- indexer.storeStatement(new RyaStatement(aliceSSN, new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")));
- indexer.storeStatement(new RyaStatement(aliceSSN, new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")));
- indexer.storeStatement(new RyaStatement(aliceSSN, new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")));
+ final RyaIRI aliceSSN = new RyaIRI("urn:SSN/111-11-1111");
+ indexer.storeStatement(new RyaStatement(aliceSSN, new RyaIRI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")));
+ indexer.storeStatement(new RyaStatement(aliceSSN, new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")));
+ indexer.storeStatement(new RyaStatement(aliceSSN, new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")));
+ indexer.storeStatement(new RyaStatement(aliceSSN, new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")));
// Fetch the Entity from storage and ensure it looks correct.
final EntityStorage entities = new MongoEntityStorage(getMongoClient(), conf.getRyaInstanceName());
- final Entity entity = entities.get(new RyaURI("urn:SSN/111-11-1111")).get();
+ final Entity entity = entities.get(new RyaIRI("urn:SSN/111-11-1111")).get();
final Entity expected = Entity.builder()
.setSubject(aliceSSN)
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
- .setProperty(new RyaURI("urn:employee"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setProperty(new RyaIRI("urn:employee"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
.setVersion( entity.getVersion() )
.build();
@@ -160,18 +160,18 @@
types.create(EMPLOYEE_TYPE);
// Index a bunch of RyaStatements.
- final RyaURI aliceSSN = new RyaURI("urn:SSN/111-11-1111");
- final RyaURI bobSSN = new RyaURI("urn:SSN/222-22-2222");
+ final RyaIRI aliceSSN = new RyaIRI("urn:SSN/111-11-1111");
+ final RyaIRI bobSSN = new RyaIRI("urn:SSN/222-22-2222");
indexer.storeStatements(Sets.newHashSet(
- new RyaStatement(aliceSSN, new RyaURI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")),
- new RyaStatement(aliceSSN, new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")),
- new RyaStatement(aliceSSN, new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")),
- new RyaStatement(aliceSSN, new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")),
+ new RyaStatement(aliceSSN, new RyaIRI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")),
- new RyaStatement(bobSSN, new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")),
- new RyaStatement(bobSSN, new RyaURI("urn:hoursPerWeek"), new RyaType(XMLSchema.INT, "40")),
- new RyaStatement(bobSSN, new RyaURI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:employee"))));
+ new RyaStatement(bobSSN, new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")),
+ new RyaStatement(bobSSN, new RyaIRI("urn:hoursPerWeek"), new RyaType(XMLSchema.INT, "40")),
+ new RyaStatement(bobSSN, new RyaIRI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:employee"))));
// Fetch the Entity from storage and ensure it looks correct.
final EntityStorage entities = new MongoEntityStorage(getMongoClient(), conf.getRyaInstanceName());
@@ -182,19 +182,19 @@
final Entity expectedAlice = Entity.builder()
.setSubject(aliceSSN)
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
- .setProperty(new RyaURI("urn:employee"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setProperty(new RyaIRI("urn:employee"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
.setVersion( alice.getVersion() )
.build();
final Entity expectedBob = Entity.builder()
.setSubject(bobSSN)
- .setExplicitType(new RyaURI("urn:employee"))
- .setProperty(new RyaURI("urn:employee"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")))
- .setProperty(new RyaURI("urn:employee"), new Property(new RyaURI("urn:hoursPerWeek"), new RyaType(XMLSchema.INT, "40")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")))
+ .setExplicitType(new RyaIRI("urn:employee"))
+ .setProperty(new RyaIRI("urn:employee"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")))
+ .setProperty(new RyaIRI("urn:employee"), new Property(new RyaIRI("urn:hoursPerWeek"), new RyaType(XMLSchema.INT, "40")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Bob")))
.setVersion( bob.getVersion() )
.build();
final Set<Entity> expected = Sets.newHashSet(expectedAlice, expectedBob);
@@ -214,27 +214,27 @@
types.create(EMPLOYEE_TYPE);
// Index a bunch of RyaStatements.
- final RyaURI aliceSSN = new RyaURI("urn:SSN/111-11-1111");
+ final RyaIRI aliceSSN = new RyaIRI("urn:SSN/111-11-1111");
indexer.storeStatements(Sets.newHashSet(
- new RyaStatement(aliceSSN, new RyaURI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")),
- new RyaStatement(aliceSSN, new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")),
- new RyaStatement(aliceSSN, new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")),
- new RyaStatement(aliceSSN, new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue"))));
+ new RyaStatement(aliceSSN, new RyaIRI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue"))));
// Remove the explicit type from Alice.
- indexer.deleteStatement(new RyaStatement(aliceSSN, new RyaURI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")));
+ indexer.deleteStatement(new RyaStatement(aliceSSN, new RyaIRI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")));
// Fetch the Entity from storage and ensure it looks correct.
final EntityStorage entities = new MongoEntityStorage(getMongoClient(), conf.getRyaInstanceName());
- final Entity entity = entities.get(new RyaURI("urn:SSN/111-11-1111")).get();
+ final Entity entity = entities.get(new RyaIRI("urn:SSN/111-11-1111")).get();
final Entity expected = Entity.builder()
.setSubject(aliceSSN)
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
- .setProperty(new RyaURI("urn:employee"), new Property(new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setProperty(new RyaIRI("urn:employee"), new Property(new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")))
.setVersion( entity.getVersion() )
.build();
@@ -253,26 +253,26 @@
types.create(EMPLOYEE_TYPE);
// Index a bunch of RyaStatements.
- final RyaURI aliceSSN = new RyaURI("urn:SSN/111-11-1111");
+ final RyaIRI aliceSSN = new RyaIRI("urn:SSN/111-11-1111");
indexer.storeStatements(Sets.newHashSet(
- new RyaStatement(aliceSSN, new RyaURI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")),
- new RyaStatement(aliceSSN, new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")),
- new RyaStatement(aliceSSN, new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")),
- new RyaStatement(aliceSSN, new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue"))));
+ new RyaStatement(aliceSSN, new RyaIRI( RDF.TYPE.toString() ), new RyaType(XMLSchema.ANYURI, "urn:person")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")),
+ new RyaStatement(aliceSSN, new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue"))));
// Remove the name property from Alice.
- indexer.deleteStatement(new RyaStatement(aliceSSN, new RyaURI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")));
+ indexer.deleteStatement(new RyaStatement(aliceSSN, new RyaIRI("urn:name"), new RyaType(XMLSchema.STRING, "Alice")));
// Fetch the Entity from storage and ensure it looks correct.
final EntityStorage entities = new MongoEntityStorage(getMongoClient(), conf.getRyaInstanceName());
- final Entity entity = entities.get(new RyaURI("urn:SSN/111-11-1111")).get();
+ final Entity entity = entities.get(new RyaIRI("urn:SSN/111-11-1111")).get();
final Entity expected = Entity.builder()
.setSubject(aliceSSN)
- .setExplicitType(new RyaURI("urn:person"))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:age"), new RyaType(XMLSchema.INT, "30")))
- .setProperty(new RyaURI("urn:person"), new Property(new RyaURI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
+ .setExplicitType(new RyaIRI("urn:person"))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:age"), new RyaType(XMLSchema.INT, "30")))
+ .setProperty(new RyaIRI("urn:person"), new Property(new RyaIRI("urn:eye"), new RyaType(XMLSchema.STRING, "blue")))
.setVersion( entity.getVersion() )
.build();
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoDbSmartUriIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoDbSmartUriIT.java
index 8d86a6d..db599ab 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoDbSmartUriIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoDbSmartUriIT.java
@@ -27,7 +27,7 @@
import static org.apache.rya.api.domain.RyaTypeUtils.longRyaType;
import static org.apache.rya.api.domain.RyaTypeUtils.shortRyaType;
import static org.apache.rya.api.domain.RyaTypeUtils.stringRyaType;
-import static org.apache.rya.api.domain.RyaTypeUtils.uriRyaType;
+import static org.apache.rya.api.domain.RyaTypeUtils.iriRyaType;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -39,7 +39,7 @@
import java.util.Set;
import org.apache.rya.api.domain.RyaSchema;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.indexing.entity.model.Entity;
@@ -79,35 +79,35 @@
private static final ValueFactory VF = SimpleValueFactory.getInstance();
// People
- private static final RyaURI BOB = createRyaUri("Bob");
+ private static final RyaIRI BOB = createRyaIri("Bob");
// Attributes
- private static final RyaURI HAS_WEIGHT = createRyaUri("hasWeight");
- private static final RyaURI HAS_HEIGHT = createRyaUri("hasHeight");
- private static final RyaURI HAS_SSN = createRyaUri("hasSSN");
- private static final RyaURI HAS_AGE = createRyaUri("hasAge");
- private static final RyaURI HAS_INCOME = createRyaUri("hasIncome");
- private static final RyaURI HAS_NUMBER_OF_CHILDREN = createRyaUri("hasNumberOfChildren");
- private static final RyaURI HAS_LICENSE_NUMBER = createRyaUri("hasLicenseNumber");
- private static final RyaURI HAS_EYE_COLOR = createRyaUri("hasEyeColor");
- private static final RyaURI HAS_HAIR_COLOR = createRyaUri("hasHairColor");
- private static final RyaURI HAS_DATE_OF_BIRTH = createRyaUri("hasDateOfBirth");
- private static final RyaURI HAS_EXPIRATION_DATE = createRyaUri("hasExpirationDate");
- private static final RyaURI HAS_GLASSES = createRyaUri("hasGlasses");
- private static final RyaURI HAS_EMAIL_ADDRESS = createRyaUri("hasEmailAddress");
- private static final RyaURI HAS_ATTRIBUTE_SPACE = createRyaUri("has Attribute Space");
- private static final RyaURI HAS_MOTTO = createRyaUri("hasMotto");
- private static final RyaURI HAS_BLOOD_TYPE = createRyaUri("hasBloodType");
- private static final RyaURI HAS_SEX = createRyaUri("hasSex");
- private static final RyaURI HAS_ADDRESS = createRyaUri("hasAddress");
- private static final RyaURI HAS_POSITION_TITLE = createRyaUri("hasPositionTitle");
- private static final RyaURI HAS_WORK_ADDRESS = createRyaUri("hasWorkAddress");
- private static final RyaURI HAS_EXTENSION = createRyaUri("hasExtension");
- private static final RyaURI HAS_OFFICE_ROOM_NUMBER = createRyaUri("hasOfficeRoomNumber");
+ private static final RyaIRI HAS_WEIGHT = createRyaIri("hasWeight");
+ private static final RyaIRI HAS_HEIGHT = createRyaIri("hasHeight");
+ private static final RyaIRI HAS_SSN = createRyaIri("hasSSN");
+ private static final RyaIRI HAS_AGE = createRyaIri("hasAge");
+ private static final RyaIRI HAS_INCOME = createRyaIri("hasIncome");
+ private static final RyaIRI HAS_NUMBER_OF_CHILDREN = createRyaIri("hasNumberOfChildren");
+ private static final RyaIRI HAS_LICENSE_NUMBER = createRyaIri("hasLicenseNumber");
+ private static final RyaIRI HAS_EYE_COLOR = createRyaIri("hasEyeColor");
+ private static final RyaIRI HAS_HAIR_COLOR = createRyaIri("hasHairColor");
+ private static final RyaIRI HAS_DATE_OF_BIRTH = createRyaIri("hasDateOfBirth");
+ private static final RyaIRI HAS_EXPIRATION_DATE = createRyaIri("hasExpirationDate");
+ private static final RyaIRI HAS_GLASSES = createRyaIri("hasGlasses");
+ private static final RyaIRI HAS_EMAIL_ADDRESS = createRyaIri("hasEmailAddress");
+ private static final RyaIRI HAS_ATTRIBUTE_SPACE = createRyaIri("has Attribute Space");
+ private static final RyaIRI HAS_MOTTO = createRyaIri("hasMotto");
+ private static final RyaIRI HAS_BLOOD_TYPE = createRyaIri("hasBloodType");
+ private static final RyaIRI HAS_SEX = createRyaIri("hasSex");
+ private static final RyaIRI HAS_ADDRESS = createRyaIri("hasAddress");
+ private static final RyaIRI HAS_POSITION_TITLE = createRyaIri("hasPositionTitle");
+ private static final RyaIRI HAS_WORK_ADDRESS = createRyaIri("hasWorkAddress");
+ private static final RyaIRI HAS_EXTENSION = createRyaIri("hasExtension");
+ private static final RyaIRI HAS_OFFICE_ROOM_NUMBER = createRyaIri("hasOfficeRoomNumber");
// Type URIs
- private static final RyaURI PERSON_TYPE_URI = new RyaURI("urn:example/person");
- private static final RyaURI EMPLOYEE_TYPE_URI = new RyaURI("urn:example/employee");
+ private static final RyaIRI PERSON_TYPE_URI = new RyaIRI("urn:example/person");
+ private static final RyaIRI EMPLOYEE_TYPE_URI = new RyaIRI("urn:example/employee");
// Entities
private static final Entity BOB_ENTITY = createBobEntity();
@@ -124,22 +124,22 @@
}
/**
- * Creates a {@link RyaURI} for the specified local name.
- * @param localName the URI's local name.
- * @return the {@link RyraURI}.
+ * Creates a {@link RyaIRI} for the specified local name.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- private static RyaURI createRyaUri(final String localName) {
- return createRyaUri(NAMESPACE, localName);
+ private static RyaIRI createRyaIri(final String localName) {
+ return createRyaIri(NAMESPACE, localName);
}
/**
- * Creates a {@link RyaURI} for the specified local name.
+ * Creates a {@link RyaIRI} for the specified local name.
* @param namespace the namespace.
- * @param localName the URI's local name.
- * @return the {@link RyraURI}.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- private static RyaURI createRyaUri(final String namespace, final String localName) {
- return RdfToRyaConversions.convertURI(VF.createIRI(namespace, localName));
+ private static RyaIRI createRyaIri(final String namespace, final String localName) {
+ return RdfToRyaConversions.convertIRI(VF.createIRI(namespace, localName));
}
private static Entity createBobEntity() {
@@ -159,7 +159,7 @@
.setProperty(PERSON_TYPE_URI, new Property(HAS_DATE_OF_BIRTH, dateRyaType(new DateTime().minusYears(40))))
.setProperty(PERSON_TYPE_URI, new Property(HAS_EXPIRATION_DATE, dateRyaType(new Date())))
.setProperty(PERSON_TYPE_URI, new Property(HAS_GLASSES, booleanRyaType(true)))
- .setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, uriRyaType(VF.createIRI("mailto:bob.smitch00@gmail.com"))))
+ .setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, iriRyaType(VF.createIRI("mailto:bob.smitch00@gmail.com"))))
.setProperty(PERSON_TYPE_URI, new Property(HAS_ATTRIBUTE_SPACE, stringRyaType("attribute space")))
.setProperty(PERSON_TYPE_URI, new Property(HAS_MOTTO, stringRyaType("!@#*\\&%20^ smörgåsbord")))
.setProperty(PERSON_TYPE_URI, new Property(HAS_BLOOD_TYPE, stringRyaType("A+ blood type")))
@@ -176,7 +176,7 @@
private static Type createPersonType() {
final Type personType = new Type(PERSON_TYPE_URI,
- ImmutableSet.<RyaURI>builder()
+ ImmutableSet.<RyaIRI>builder()
.add(HAS_WEIGHT)
.add(HAS_HEIGHT)
.add(HAS_SSN)
@@ -201,7 +201,7 @@
private static Type createEmployeeType() {
final Type employeeType = new Type(EMPLOYEE_TYPE_URI,
- ImmutableSet.<RyaURI>builder()
+ ImmutableSet.<RyaIRI>builder()
.add(HAS_POSITION_TITLE)
.add(HAS_WORK_ADDRESS)
.add(HAS_EXTENSION)
@@ -210,8 +210,8 @@
return employeeType;
}
- private static String getRyaUriLocalName(final RyaURI ryaUri) {
- return VF.createIRI(ryaUri.getData()).getLocalName();
+ private static String getRyaIriLocalName(final RyaIRI ryaIri) {
+ return VF.createIRI(ryaIri.getData()).getLocalName();
}
@Test
@@ -258,8 +258,8 @@
smartUriConverter.storeEntity(BOB_ENTITY);
// New properties to add
- final RyaURI hasNickName = createRyaUri("hasNickName");
- final RyaURI hasWindowOffice = createRyaUri("hasWindowOffice");
+ final RyaIRI hasNickName = createRyaIri("hasNickName");
+ final RyaIRI hasWindowOffice = createRyaIri("hasWindowOffice");
final Entity.Builder builder = Entity.builder(BOB_ENTITY);
builder.setProperty(PERSON_TYPE_URI, new Property(HAS_AGE, shortRyaType((short) 41)));
@@ -281,8 +281,8 @@
assertEquals(newBobEntity.lookupTypeProperty(EMPLOYEE_TYPE, hasWindowOffice), resultEntity.lookupTypeProperty(EMPLOYEE_TYPE, hasWindowOffice));
assertEquals(newBobEntity.getSmartUri(), resultEntity.getSmartUri());
final String resultUriString = resultEntity.getSmartUri().stringValue();
- assertTrue(resultUriString.contains(getRyaUriLocalName(hasWindowOffice)));
- assertTrue(resultUriString.contains(getRyaUriLocalName(hasNickName)));
+ assertTrue(resultUriString.contains(getRyaIriLocalName(hasWindowOffice)));
+ assertTrue(resultUriString.contains(getRyaIriLocalName(hasNickName)));
}
@Test
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoEntityIndex2IT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoEntityIndex2IT.java
index 3a38923..78da9cd 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoEntityIndex2IT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoEntityIndex2IT.java
@@ -21,7 +21,7 @@
import java.util.List;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.entity.EntityIndexOptimizer;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Property;
@@ -46,13 +46,13 @@
public class MongoEntityIndex2IT extends MongoITBase {
private static final Type PERSON_TYPE =
- new Type(new RyaURI("urn:person"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:name"))
- .add(new RyaURI("urn:age"))
- .add(new RyaURI("urn:eye"))
+ new Type(new RyaIRI("urn:person"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:name"))
+ .add(new RyaIRI("urn:age"))
+ .add(new RyaIRI("urn:eye"))
.build());
- private static final RyaURI RYA_PERSON_TYPE = new RyaURI("urn:person");
+ private static final RyaIRI RYA_PERSON_TYPE = new RyaIRI("urn:person");
private EntityIndexOptimizer optimizer;
private EntityStorage entityStorage;
@@ -66,11 +66,11 @@
typeStorage.create(PERSON_TYPE);
final Entity entity = Entity.builder()
- .setSubject(new RyaURI("urn:SSN:111-11-1111"))
+ .setSubject(new RyaIRI("urn:SSN:111-11-1111"))
.setExplicitType(RYA_PERSON_TYPE)
- .setProperty(RYA_PERSON_TYPE, new Property(new RyaURI("urn:age"), new RyaType("25")))
- .setProperty(RYA_PERSON_TYPE, new Property(new RyaURI("urn:eye"), new RyaType("blue")))
- .setProperty(RYA_PERSON_TYPE, new Property(new RyaURI("urn:name"), new RyaType("bob")))
+ .setProperty(RYA_PERSON_TYPE, new Property(new RyaIRI("urn:age"), new RyaType("25")))
+ .setProperty(RYA_PERSON_TYPE, new Property(new RyaIRI("urn:eye"), new RyaType("blue")))
+ .setProperty(RYA_PERSON_TYPE, new Property(new RyaIRI("urn:name"), new RyaType("bob")))
.build();
entityStorage = optimizer.getEntityStorage();
entityStorage.create(entity);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoEntityIndexIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoEntityIndexIT.java
index f49f274..3636448 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoEntityIndexIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoEntityIndexIT.java
@@ -26,7 +26,7 @@
import java.util.Optional;
import java.util.Set;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.accumulo.ConfigUtils;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Type;
@@ -75,7 +75,7 @@
addStatements(conn);
final EntityStorage entities = indexer.getEntityStorage();
- final RyaURI subject = new RyaURI("urn:alice");
+ final RyaIRI subject = new RyaIRI("urn:alice");
final Optional<Entity> alice = entities.get(subject);
assertTrue(alice.isPresent());
} finally {
@@ -161,32 +161,32 @@
private void setupTypes(MongoEntityIndexer indexer) throws Exception {
final TypeStorage typeStore = indexer.getTypeStorage();
// Add some Types to the storage.
- final Type cat = new Type(new RyaURI("urn:cat"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:numLegs"))
- .add(new RyaURI("urn:eye"))
- .add(new RyaURI("urn:species"))
+ final Type cat = new Type(new RyaIRI("urn:cat"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:numLegs"))
+ .add(new RyaIRI("urn:eye"))
+ .add(new RyaIRI("urn:species"))
.build());
- final Type dog = new Type(new RyaURI("urn:dog"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:numLegs"))
- .add(new RyaURI("urn:eye"))
- .add(new RyaURI("urn:species"))
+ final Type dog = new Type(new RyaIRI("urn:dog"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:numLegs"))
+ .add(new RyaIRI("urn:eye"))
+ .add(new RyaIRI("urn:species"))
.build());
- final Type icecream = new Type(new RyaURI("urn:icecream"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:brand"))
- .add(new RyaURI("urn:flavor"))
- .add(new RyaURI("urn:cost"))
+ final Type icecream = new Type(new RyaIRI("urn:icecream"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:brand"))
+ .add(new RyaIRI("urn:flavor"))
+ .add(new RyaIRI("urn:cost"))
.build());
- final Type person = new Type(new RyaURI("urn:person"),
- ImmutableSet.<RyaURI>builder()
- .add(new RyaURI("urn:name"))
- .add(new RyaURI("urn:age"))
- .add(new RyaURI("urn:eye"))
+ final Type person = new Type(new RyaIRI("urn:person"),
+ ImmutableSet.<RyaIRI>builder()
+ .add(new RyaIRI("urn:name"))
+ .add(new RyaIRI("urn:age"))
+ .add(new RyaIRI("urn:eye"))
.build());
typeStore.create(cat);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoFreeTextIndexerIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoFreeTextIndexerIT.java
index d827f78..4d2c6ce 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoFreeTextIndexerIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/mongo/MongoFreeTextIndexerIT.java
@@ -26,7 +26,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.indexing.StatementConstraints;
@@ -126,20 +126,20 @@
f.init();
// These should not be stored because they are not in the predicate list
- f.storeStatement(new RyaStatement(new RyaURI("foo:subj1"), new RyaURI(RDFS.LABEL.toString()), new RyaType("invalid")));
- f.storeStatement(new RyaStatement(new RyaURI("foo:subj2"), new RyaURI(RDFS.COMMENT.toString()), new RyaType("invalid")));
+ f.storeStatement(new RyaStatement(new RyaIRI("foo:subj1"), new RyaIRI(RDFS.LABEL.toString()), new RyaType("invalid")));
+ f.storeStatement(new RyaStatement(new RyaIRI("foo:subj2"), new RyaIRI(RDFS.COMMENT.toString()), new RyaType("invalid")));
- final RyaURI pred1 = new RyaURI("pred:1");
- final RyaURI pred2 = new RyaURI("pred:2");
+ final RyaIRI pred1 = new RyaIRI("pred:1");
+ final RyaIRI pred2 = new RyaIRI("pred:2");
// These should be stored because they are in the predicate list
- final RyaStatement s3 = new RyaStatement(new RyaURI("foo:subj3"), pred1, new RyaType("valid"));
- final RyaStatement s4 = new RyaStatement(new RyaURI("foo:subj4"), pred2, new RyaType("valid"));
+ final RyaStatement s3 = new RyaStatement(new RyaIRI("foo:subj3"), pred1, new RyaType("valid"));
+ final RyaStatement s4 = new RyaStatement(new RyaIRI("foo:subj4"), pred2, new RyaType("valid"));
f.storeStatement(s3);
f.storeStatement(s4);
// This should not be stored because the object is not a literal
- f.storeStatement(new RyaStatement(new RyaURI("foo:subj5"), pred1, new RyaURI("in:validURI")));
+ f.storeStatement(new RyaStatement(new RyaIRI("foo:subj5"), pred1, new RyaIRI("in:validURI")));
f.flush();
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/smarturi/duplication/DuplicateDataDetectorIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/smarturi/duplication/DuplicateDataDetectorIT.java
index fa55df4..9d26914 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/smarturi/duplication/DuplicateDataDetectorIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/smarturi/duplication/DuplicateDataDetectorIT.java
@@ -28,7 +28,7 @@
import static org.apache.rya.api.domain.RyaTypeUtils.longRyaType;
import static org.apache.rya.api.domain.RyaTypeUtils.shortRyaType;
import static org.apache.rya.api.domain.RyaTypeUtils.stringRyaType;
-import static org.apache.rya.api.domain.RyaTypeUtils.uriRyaType;
+import static org.apache.rya.api.domain.RyaTypeUtils.iriRyaType;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -47,7 +47,7 @@
import org.apache.rya.api.domain.RyaSchema;
import org.apache.rya.api.domain.RyaType;
import org.apache.rya.api.domain.RyaTypeUtils;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.indexing.entity.model.Entity;
import org.apache.rya.indexing.entity.model.Entity.Builder;
@@ -82,55 +82,55 @@
private static final ValueFactory VF = SimpleValueFactory.getInstance();
// People
- private static final RyaURI BOB = createRyaUri("Bob");
+ private static final RyaIRI BOB = createRyaIri("Bob");
// Attributes
- private static final RyaURI HAS_WEIGHT = createRyaUri("hasWeight");
- private static final RyaURI HAS_HEIGHT = createRyaUri("hasHeight");
- private static final RyaURI HAS_SSN = createRyaUri("hasSSN");
- private static final RyaURI HAS_AGE = createRyaUri("hasAge");
- private static final RyaURI HAS_INCOME = createRyaUri("hasIncome");
- private static final RyaURI HAS_NUMBER_OF_CHILDREN = createRyaUri("hasNumberOfChildren");
- private static final RyaURI HAS_LICENSE_NUMBER = createRyaUri("hasLicenseNumber");
- private static final RyaURI HAS_EYE_COLOR = createRyaUri("hasEyeColor");
- private static final RyaURI HAS_HAIR_COLOR = createRyaUri("hasHairColor");
- private static final RyaURI HAS_DATE_OF_BIRTH = createRyaUri("hasDateOfBirth");
- private static final RyaURI HAS_EXPIRATION_DATE = createRyaUri("hasExpirationDate");
- private static final RyaURI HAS_GLASSES = createRyaUri("hasGlasses");
- private static final RyaURI HAS_EMAIL_ADDRESS = createRyaUri("hasEmailAddress");
- private static final RyaURI HAS_ATTRIBUTE_SPACE = createRyaUri("has Attribute Space");
- private static final RyaURI HAS_MOTTO = createRyaUri("hasMotto");
- private static final RyaURI HAS_BLOOD_TYPE = createRyaUri("hasBloodType");
- private static final RyaURI HAS_SEX = createRyaUri("hasSex");
- private static final RyaURI HAS_ADDRESS = createRyaUri("hasAddress");
- private static final RyaURI HAS_POSITION_TITLE = createRyaUri("hasPositionTitle");
- private static final RyaURI HAS_WORK_ADDRESS = createRyaUri("hasWorkAddress");
- private static final RyaURI HAS_EXTENSION = createRyaUri("hasExtension");
- private static final RyaURI HAS_OFFICE_ROOM_NUMBER = createRyaUri("hasOfficeRoomNumber");
+ private static final RyaIRI HAS_WEIGHT = createRyaIri("hasWeight");
+ private static final RyaIRI HAS_HEIGHT = createRyaIri("hasHeight");
+ private static final RyaIRI HAS_SSN = createRyaIri("hasSSN");
+ private static final RyaIRI HAS_AGE = createRyaIri("hasAge");
+ private static final RyaIRI HAS_INCOME = createRyaIri("hasIncome");
+ private static final RyaIRI HAS_NUMBER_OF_CHILDREN = createRyaIri("hasNumberOfChildren");
+ private static final RyaIRI HAS_LICENSE_NUMBER = createRyaIri("hasLicenseNumber");
+ private static final RyaIRI HAS_EYE_COLOR = createRyaIri("hasEyeColor");
+ private static final RyaIRI HAS_HAIR_COLOR = createRyaIri("hasHairColor");
+ private static final RyaIRI HAS_DATE_OF_BIRTH = createRyaIri("hasDateOfBirth");
+ private static final RyaIRI HAS_EXPIRATION_DATE = createRyaIri("hasExpirationDate");
+ private static final RyaIRI HAS_GLASSES = createRyaIri("hasGlasses");
+ private static final RyaIRI HAS_EMAIL_ADDRESS = createRyaIri("hasEmailAddress");
+ private static final RyaIRI HAS_ATTRIBUTE_SPACE = createRyaIri("has Attribute Space");
+ private static final RyaIRI HAS_MOTTO = createRyaIri("hasMotto");
+ private static final RyaIRI HAS_BLOOD_TYPE = createRyaIri("hasBloodType");
+ private static final RyaIRI HAS_SEX = createRyaIri("hasSex");
+ private static final RyaIRI HAS_ADDRESS = createRyaIri("hasAddress");
+ private static final RyaIRI HAS_POSITION_TITLE = createRyaIri("hasPositionTitle");
+ private static final RyaIRI HAS_WORK_ADDRESS = createRyaIri("hasWorkAddress");
+ private static final RyaIRI HAS_EXTENSION = createRyaIri("hasExtension");
+ private static final RyaIRI HAS_OFFICE_ROOM_NUMBER = createRyaIri("hasOfficeRoomNumber");
// Type URIs
- private static final RyaURI PERSON_TYPE_URI = new RyaURI("urn:example/person");
- private static final RyaURI EMPLOYEE_TYPE_URI = new RyaURI("urn:example/employee");
+ private static final RyaIRI PERSON_TYPE_URI = new RyaIRI("urn:example/person");
+ private static final RyaIRI EMPLOYEE_TYPE_URI = new RyaIRI("urn:example/employee");
private static final Date NOW = new Date();
/**
- * Creates a {@link RyaURI} for the specified local name.
- * @param localName the URI's local name.
- * @return the {@link RyraURI}.
+ * Creates a {@link RyaIRI} for the specified local name.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- private static RyaURI createRyaUri(final String localName) {
- return createRyaUri(NAMESPACE, localName);
+ private static RyaIRI createRyaIri(final String localName) {
+ return createRyaIri(NAMESPACE, localName);
}
/**
- * Creates a {@link RyaURI} for the specified local name.
+ * Creates a {@link RyaIRI} for the specified local name.
* @param namespace the namespace.
- * @param localName the URI's local name.
- * @return the {@link RyraURI}.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- private static RyaURI createRyaUri(final String namespace, final String localName) {
- return RdfToRyaConversions.convertURI(VF.createIRI(namespace, localName));
+ private static RyaIRI createRyaIri(final String namespace, final String localName) {
+ return RdfToRyaConversions.convertIRI(VF.createIRI(namespace, localName));
}
private static Entity createBobEntity() {
@@ -150,7 +150,7 @@
.setProperty(PERSON_TYPE_URI, new Property(HAS_DATE_OF_BIRTH, dateRyaType(new DateTime(NOW.getTime()).minusYears(40))))
.setProperty(PERSON_TYPE_URI, new Property(HAS_EXPIRATION_DATE, dateRyaType(NOW)))
.setProperty(PERSON_TYPE_URI, new Property(HAS_GLASSES, booleanRyaType(true)))
- .setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, uriRyaType(VF.createIRI("mailto:bob.smitch00@gmail.com"))))
+ .setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, iriRyaType(VF.createIRI("mailto:bob.smitch00@gmail.com"))))
.setProperty(PERSON_TYPE_URI, new Property(HAS_ATTRIBUTE_SPACE, stringRyaType("attribute space")))
.setProperty(PERSON_TYPE_URI, new Property(HAS_MOTTO, stringRyaType("!@#*\\&%20^ smörgåsbord")))
.setProperty(PERSON_TYPE_URI, new Property(HAS_BLOOD_TYPE, stringRyaType("A+ blood type")))
@@ -169,7 +169,7 @@
final Type personType =
new Type(
PERSON_TYPE_URI,
- ImmutableSet.<RyaURI>builder()
+ ImmutableSet.<RyaIRI>builder()
.add(HAS_WEIGHT)
.add(HAS_HEIGHT)
.add(HAS_SSN)
@@ -197,7 +197,7 @@
final Type employeeType =
new Type(
EMPLOYEE_TYPE_URI,
- ImmutableSet.<RyaURI>builder()
+ ImmutableSet.<RyaIRI>builder()
.add(HAS_POSITION_TITLE)
.add(HAS_WORK_ADDRESS)
.add(HAS_EXTENSION)
@@ -236,7 +236,7 @@
public void testEntitySubjectsDifferent() throws SmartUriException, ConfigurationException {
final Entity entity1 = createBobEntity();
final Builder builder = new Builder(entity1);
- builder.setSubject(createRyaUri("Susan"));
+ builder.setSubject(createRyaIri("Susan"));
final Entity entity2 = builder.build();
final DuplicateDataDetector duplicateDataDetector = new DuplicateDataDetector();
@@ -248,7 +248,7 @@
public void testEntityMissingType() throws SmartUriException, ConfigurationException {
final Entity entity1 = createBobEntity();
final Builder builder = new Builder(entity1);
- builder.setExplicitType(new RyaURI("urn:example/manager"));
+ builder.setExplicitType(new RyaIRI("urn:example/manager"));
final Entity entity2 = builder.build();
final DuplicateDataDetector duplicateDataDetector = new DuplicateDataDetector();
@@ -1801,7 +1801,7 @@
assertTrue(entityStorage.get(bobEntity.getSubject()).isPresent());
final Builder duplicateBobBuilder = Entity.builder(createBobEntity());
- duplicateBobBuilder.setSubject(createRyaUri("Robert"));
+ duplicateBobBuilder.setSubject(createRyaIri("Robert"));
// Modify a property for each type that is within tolerance
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_AGE, shortRyaType((short) 41)));
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_WEIGHT, floatRyaType(250.76f)));
@@ -1812,7 +1812,7 @@
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_DATE_OF_BIRTH, dateRyaType(new DateTime(NOW.getTime() - 1).minusYears(40))));
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EXPIRATION_DATE, dateRyaType(new Date(NOW.getTime() - 1))));
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_GLASSES, booleanRyaType(true)));
- duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, uriRyaType(VF.createIRI("mailto:bob.smitch01@gmail.com"))));
+ duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, iriRyaType(VF.createIRI("mailto:bob.smitch01@gmail.com"))));
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_ADDRESS, stringRyaType("124 Fake St. Washington, DC 20024")));
duplicateBobBuilder.setProperty(EMPLOYEE_TYPE_URI, new Property(HAS_EXTENSION, shortRyaType((short) 556)));
final Entity duplicateBobEntity = duplicateBobBuilder.build();
@@ -1829,7 +1829,7 @@
assertFalse(entityStorage.get(duplicateBobEntity.getSubject()).isPresent());
final Builder notDuplicateBobBuilder = Entity.builder(createBobEntity());
- notDuplicateBobBuilder.setSubject(createRyaUri("Not Bob"));
+ notDuplicateBobBuilder.setSubject(createRyaIri("Not Bob"));
// Modify a property for each type that is within tolerance
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_AGE, shortRyaType((short) 50)));
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_WEIGHT, floatRyaType(300.0f)));
@@ -1840,7 +1840,7 @@
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_DATE_OF_BIRTH, dateRyaType(new DateTime(NOW.getTime() - 10000000L).minusYears(40))));
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EXPIRATION_DATE, dateRyaType(new Date(NOW.getTime() - 10000000L))));
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_GLASSES, booleanRyaType(false)));
- notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, uriRyaType(VF.createIRI("mailto:bad.email.address@gmail.com"))));
+ notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, iriRyaType(VF.createIRI("mailto:bad.email.address@gmail.com"))));
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_ADDRESS, stringRyaType("123456789 Fake St. Washington, DC 20024")));
notDuplicateBobBuilder.setProperty(EMPLOYEE_TYPE_URI, new Property(HAS_EXTENSION, shortRyaType((short) 1000)));
final Entity notDuplicateBobEntity = notDuplicateBobBuilder.build();
@@ -1892,7 +1892,7 @@
assertTrue(entityStorage.get(bobEntity.getSubject()).isPresent());
final Builder duplicateBobBuilder = Entity.builder(createBobEntity());
- duplicateBobBuilder.setSubject(createRyaUri("Robert"));
+ duplicateBobBuilder.setSubject(createRyaIri("Robert"));
// Modify a property for each type that is within tolerance
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_AGE, shortRyaType((short) 41)));
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_WEIGHT, floatRyaType(250.76f)));
@@ -1903,7 +1903,7 @@
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_DATE_OF_BIRTH, dateRyaType(new DateTime(NOW.getTime() - 1).minusYears(40))));
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EXPIRATION_DATE, dateRyaType(new Date(NOW.getTime() - 1))));
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_GLASSES, booleanRyaType(true)));
- duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, uriRyaType(VF.createIRI("mailto:bob.smitch01@gmail.com"))));
+ duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, iriRyaType(VF.createIRI("mailto:bob.smitch01@gmail.com"))));
duplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_ADDRESS, stringRyaType("124 Fake St. Washington, DC 20024")));
duplicateBobBuilder.setProperty(EMPLOYEE_TYPE_URI, new Property(HAS_EXTENSION, shortRyaType((short) 556)));
final Entity duplicateBobEntity = duplicateBobBuilder.build();
@@ -1918,7 +1918,7 @@
assertTrue(entityStorage.get(duplicateBobEntity.getSubject()).isPresent());
final Builder notDuplicateBobBuilder = Entity.builder(createBobEntity());
- notDuplicateBobBuilder.setSubject(createRyaUri("Not Bob"));
+ notDuplicateBobBuilder.setSubject(createRyaIri("Not Bob"));
// Modify a property for each type that is within tolerance
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_AGE, shortRyaType((short) 50)));
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_WEIGHT, floatRyaType(300.0f)));
@@ -1929,7 +1929,7 @@
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_DATE_OF_BIRTH, dateRyaType(new DateTime(NOW.getTime() - 10000000L).minusYears(40))));
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EXPIRATION_DATE, dateRyaType(new Date(NOW.getTime() - 10000000L))));
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_GLASSES, booleanRyaType(false)));
- notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, uriRyaType(VF.createIRI("mailto:bad.email.address@gmail.com"))));
+ notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_EMAIL_ADDRESS, iriRyaType(VF.createIRI("mailto:bad.email.address@gmail.com"))));
notDuplicateBobBuilder.setProperty(PERSON_TYPE_URI, new Property(HAS_ADDRESS, stringRyaType("123456789 Fake St. Washington, DC 20024")));
notDuplicateBobBuilder.setProperty(EMPLOYEE_TYPE_URI, new Property(HAS_EXTENSION, shortRyaType((short) 1000)));
final Entity notDuplicateBobEntity = notDuplicateBobBuilder.build();
@@ -1950,13 +1950,13 @@
* {@code testInputs}.
* @param testInputs the {@link List} of {@link TestInput} to insert into
* the property.
- * @param typeIdUri the type ID {@link RyaURI} that the property falls
+ * @param typeIdUri the type ID {@link RyaIRI} that the property falls
* under. (not {@code null})
- * @param propertyNameUri the property name {@link RyaURI}.
+ * @param propertyNameUri the property name {@link RyaIRI}.
* (not {@code null})
* @throws SmartUriException
*/
- private static void testProperty(final List<TestInput> testInputs, final RyaURI typeIdUri, final RyaURI propertyNameUri) throws SmartUriException {
+ private static void testProperty(final List<TestInput> testInputs, final RyaIRI typeIdUri, final RyaIRI propertyNameUri) throws SmartUriException {
testProperty(testInputs, typeIdUri, propertyNameUri, new LinkedHashMap<>());
}
@@ -1966,15 +1966,15 @@
* {@code testInputs}.
* @param testInputs the {@link List} of {@link TestInput} to insert into
* the property.
- * @param typeIdUri the type ID {@link RyaURI} that the property falls
+ * @param typeIdUri the type ID {@link RyaIRI} that the property falls
* under. (not {@code null})
- * @param propertyNameUri the property name {@link RyaURI}.
+ * @param propertyNameUri the property name {@link RyaIRI}.
* (not {@code null})
* @param equivalentTermsMap the {@link Map} of terms that are considered
* equivalent to each other.
* @throws SmartUriException
*/
- private static void testProperty(final List<TestInput> testInputs, final RyaURI typeIdUri, final RyaURI propertyNameUri, final Map<String, List<String>> equivalentTermsMap) throws SmartUriException {
+ private static void testProperty(final List<TestInput> testInputs, final RyaIRI typeIdUri, final RyaIRI propertyNameUri, final Map<String, List<String>> equivalentTermsMap) throws SmartUriException {
requireNonNull(typeIdUri);
requireNonNull(propertyNameUri);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/AccumuloStatementMetadataNodeTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/AccumuloStatementMetadataNodeTest.java
index a353de8..9f6b784 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/AccumuloStatementMetadataNodeTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/AccumuloStatementMetadataNodeTest.java
@@ -28,7 +28,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.indexing.accumulo.ConfigUtils;
@@ -78,11 +78,11 @@
public void simpleQueryWithoutBindingSet()
throws MalformedQueryException, QueryEvaluationException, RyaDAOException {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement);
SPARQLParser parser = new SPARQLParser();
@@ -121,11 +121,11 @@
public void simpleQueryWithoutBindingSetInvalidProperty()
throws MalformedQueryException, QueryEvaluationException, RyaDAOException {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Doug"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-15"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Doug"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-15"));
- RyaStatement statement = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement);
SPARQLParser parser = new SPARQLParser();
@@ -146,13 +146,13 @@
public void simpleQueryWithBindingSet() throws MalformedQueryException, QueryEvaluationException, RyaDAOException {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -202,13 +202,13 @@
throws MalformedQueryException, QueryEvaluationException, RyaDAOException {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -264,11 +264,11 @@
throws MalformedQueryException, QueryEvaluationException, RyaDAOException {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
SPARQLParser parser = new SPARQLParser();
@@ -307,13 +307,13 @@
throws MalformedQueryException, QueryEvaluationException, RyaDAOException {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -385,13 +385,13 @@
+ "owl:annotatedProperty <http://worksAt>; owl:annotatedTarget ?x; <http://createdBy> ?y; <http://createdOn> \'2017-01-04\'^^xsd:date }}";
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context_1"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context_2"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context_1"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context_2"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -457,13 +457,13 @@
+ "owl:annotatedProperty <http://worksAt>; owl:annotatedTarget ?x; <http://createdBy> ?y; <http://createdOn> \'2017-01-04\'^^xsd:date }}";
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context_1"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context_2"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context_1"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context_2"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -538,13 +538,13 @@
+ "owl:annotatedProperty <http://worksAt>; owl:annotatedTarget ?x; <http://createdBy> ?y; <http://createdOn> \'2017-01-04\'^^xsd:date }}";
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context_1"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context_2"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context_1"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context_2"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -580,11 +580,11 @@
bsCollection.add(bsConstraint4);
// AccumuloRyaQueryEngine engine = dao.getQueryEngine();
-//// CloseableIteration<RyaStatement, RyaDAOException> iter = engine.query(new RyaStatement(new RyaURI("http://Joe"),
-//// new RyaURI("http://worksAt"), new RyaType("HardwareStore"), new RyaURI("http://context_2")), conf);
+//// CloseableIteration<RyaStatement, RyaDAOException> iter = engine.query(new RyaStatement(new RyaIRI("http://Joe"),
+//// new RyaIRI("http://worksAt"), new RyaType("HardwareStore"), new RyaIRI("http://context_2")), conf);
// CloseableIteration<? extends Map.Entry<RyaStatement,BindingSet>, RyaDAOException> iter = engine.queryWithBindingSet(Arrays.asList(new RdfCloudTripleStoreUtils.CustomEntry<RyaStatement, BindingSet>(
-// new RyaStatement(new RyaURI("http://Joe"),
-// new RyaURI("http://worksAt"), new RyaType("HardwareStore"), new RyaURI("http://context_2")), bsConstraint4)), conf);
+// new RyaStatement(new RyaIRI("http://Joe"),
+// new RyaIRI("http://worksAt"), new RyaType("HardwareStore"), new RyaIRI("http://context_2")), bsConstraint4)), conf);
// while (iter.hasNext()) {
// System.out.println(iter.next());
// }
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/AccumuloStatementMetadataOptimizerIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/AccumuloStatementMetadataOptimizerIT.java
index d887bc6..ebf22f0 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/AccumuloStatementMetadataOptimizerIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/AccumuloStatementMetadataOptimizerIT.java
@@ -30,7 +30,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.indexing.accumulo.ConfigUtils;
@@ -92,11 +92,11 @@
@Test
public void simpleQueryWithoutBindingSet() throws Exception {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement);
TupleQueryResult result = conn.prepareTupleQuery(QueryLanguage.SPARQL, query1).evaluate();
@@ -128,11 +128,11 @@
@Test
public void simpleQueryWithoutBindingSetInvalidProperty() throws Exception {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Doug"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-15"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Doug"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-15"));
- RyaStatement statement = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement);
TupleQueryResult result = conn.prepareTupleQuery(QueryLanguage.SPARQL, query1).evaluate();
@@ -150,13 +150,13 @@
public void simpleQueryWithBindingSet() throws Exception {
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -200,20 +200,20 @@
public void simpleQueryWithBindingSetJoinPropertyToSubject() throws Exception {
StatementMetadata metadata1 = new StatementMetadata();
- metadata1.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Doug"));
- metadata1.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata1.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Doug"));
+ metadata1.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
StatementMetadata metadata2 = new StatementMetadata();
- metadata2.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Bob"));
- metadata2.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
+ metadata2.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Bob"));
+ metadata2.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaURI("http://BurgerShack"), new RyaURI("http://context"), "", metadata1);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://talksTo"),
- new RyaURI("http://Betty"), new RyaURI("http://context"), "", metadata1);
- RyaStatement statement3 = new RyaStatement(new RyaURI("http://Fred"), new RyaURI("http://talksTo"),
- new RyaType("http://Amanda"), new RyaURI("http://context"), "", metadata1);
- RyaStatement statement4 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://talksTo"),
- new RyaType("http://Wanda"), new RyaURI("http://context"), "", metadata2);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaIRI("http://BurgerShack"), new RyaIRI("http://context"), "", metadata1);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://talksTo"),
+ new RyaIRI("http://Betty"), new RyaIRI("http://context"), "", metadata1);
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("http://Fred"), new RyaIRI("http://talksTo"),
+ new RyaType("http://Amanda"), new RyaIRI("http://context"), "", metadata1);
+ RyaStatement statement4 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://talksTo"),
+ new RyaType("http://Wanda"), new RyaIRI("http://context"), "", metadata2);
dao.add(statement1);
dao.add(statement2);
dao.add(statement3);
@@ -244,8 +244,8 @@
private static RdfCloudTripleStoreConfiguration getConf() {
RdfCloudTripleStoreConfiguration conf;
- Set<RyaURI> propertySet = new HashSet<RyaURI>(
- Arrays.asList(new RyaURI("http://createdBy"), new RyaURI("http://createdOn")));
+ Set<RyaIRI> propertySet = new HashSet<RyaIRI>(
+ Arrays.asList(new RyaIRI("http://createdBy"), new RyaIRI("http://createdOn")));
conf = new AccumuloRdfConfiguration();
conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, true);
conf.set(RdfCloudTripleStoreConfiguration.CONF_TBL_PREFIX, "rya_");
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/MongoStatementMetadataIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/MongoStatementMetadataIT.java
index 0797033..611a141 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/MongoStatementMetadataIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/MongoStatementMetadataIT.java
@@ -28,7 +28,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.mongodb.MongoDBRdfConfiguration;
@@ -61,8 +61,8 @@
@Override
protected void updateConfiguration(final MongoDBRdfConfiguration conf) {
- final Set<RyaURI> propertySet = new HashSet<>(
- Arrays.asList(new RyaURI("http://createdBy"), new RyaURI("http://createdOn")));
+ final Set<RyaIRI> propertySet = new HashSet<>(
+ Arrays.asList(new RyaIRI("http://createdBy"), new RyaIRI("http://createdOn")));
conf.setUseStatementMetadata(true);
conf.setStatementMetadataProperties(propertySet);
}
@@ -76,11 +76,11 @@
dao.init();
final StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- final RyaStatement statement = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ final RyaStatement statement = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement);
SailRepositoryConnection conn = new SailRepository(sail).getConnection();
@@ -121,11 +121,11 @@
dao.setConf(conf);
dao.init();
final StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Doug"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-15"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Doug"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-15"));
- final RyaStatement statement = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ final RyaStatement statement = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement);
SailRepositoryConnection conn = new SailRepository(sail).getConnection();
@@ -151,13 +151,13 @@
dao.setConf(conf);
dao.init();
final StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- final RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
- final RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata);
+ final RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
+ final RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -210,20 +210,20 @@
dao.setConf(conf);
dao.init();
final StatementMetadata metadata1 = new StatementMetadata();
- metadata1.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Doug"));
- metadata1.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata1.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Doug"));
+ metadata1.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
final StatementMetadata metadata2 = new StatementMetadata();
- metadata2.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Bob"));
- metadata2.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
+ metadata2.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Bob"));
+ metadata2.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
- final RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaURI("http://BurgerShack"), new RyaURI("http://context"), "", metadata1);
- final RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://talksTo"),
- new RyaURI("http://Betty"), new RyaURI("http://context"), "", metadata1);
- final RyaStatement statement3 = new RyaStatement(new RyaURI("http://Fred"), new RyaURI("http://talksTo"),
- new RyaURI("http://Amanda"), new RyaURI("http://context"), "", metadata1);
- final RyaStatement statement4 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://talksTo"),
- new RyaURI("http://Wanda"), new RyaURI("http://context"), "", metadata2);
+ final RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaIRI("http://BurgerShack"), new RyaIRI("http://context"), "", metadata1);
+ final RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://talksTo"),
+ new RyaIRI("http://Betty"), new RyaIRI("http://context"), "", metadata1);
+ final RyaStatement statement3 = new RyaStatement(new RyaIRI("http://Fred"), new RyaIRI("http://talksTo"),
+ new RyaIRI("http://Amanda"), new RyaIRI("http://context"), "", metadata1);
+ final RyaStatement statement4 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://talksTo"),
+ new RyaIRI("http://Wanda"), new RyaIRI("http://context"), "", metadata2);
dao.add(statement1);
dao.add(statement2);
dao.add(statement3);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/MongoStatementMetadataNodeIT.java b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/MongoStatementMetadataNodeIT.java
index 20fa32d..4f06ace 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/MongoStatementMetadataNodeIT.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/MongoStatementMetadataNodeIT.java
@@ -25,7 +25,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.indexing.statement.metadata.matching.StatementMetadataNode;
import org.apache.rya.mongodb.MongoDBRdfConfiguration;
@@ -56,7 +56,7 @@
@Before
public void init() throws Exception {
- final Set<RyaURI> propertySet = new HashSet<RyaURI>(Arrays.asList(new RyaURI("http://createdBy"), new RyaURI("http://createdOn")));
+ final Set<RyaIRI> propertySet = new HashSet<RyaIRI>(Arrays.asList(new RyaIRI("http://createdBy"), new RyaIRI("http://createdOn")));
conf.setUseStatementMetadata(true);
conf.setStatementMetadataProperties(propertySet);
}
@@ -68,11 +68,11 @@
dao.setConf(conf);
dao.init();
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement);
SPARQLParser parser = new SPARQLParser();
@@ -112,11 +112,11 @@
dao.init();
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Doug"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-15"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Doug"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-15"));
- RyaStatement statement = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement);
SPARQLParser parser = new SPARQLParser();
@@ -143,13 +143,13 @@
dao.setConf(conf);
dao.init();
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -200,13 +200,13 @@
dao.setConf(conf);
dao.init();
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
dao.add(statement2);
@@ -263,11 +263,11 @@
dao.setConf(conf);
dao.init();
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
SPARQLParser parser = new SPARQLParser();
@@ -307,13 +307,13 @@
dao.setConf(conf);
dao.init();
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://createdBy"), new RyaType("Joe"));
- metadata.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
+ metadata.addMetadata(new RyaIRI("http://createdBy"), new RyaType("Joe"));
+ metadata.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-04"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata);
dao.add(statement1);
dao.add(statement2);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataExternalSetProviderTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataExternalSetProviderTest.java
index c4318fb..b8b9eba 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataExternalSetProviderTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataExternalSetProviderTest.java
@@ -28,7 +28,7 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.rya.accumulo.AccumuloRdfConfiguration;
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.VarNameUtils;
import org.apache.rya.indexing.accumulo.ConfigUtils;
import org.apache.rya.indexing.external.matching.JoinSegment;
@@ -61,8 +61,8 @@
public void createSingleAccumuloMetadataNode() throws MalformedQueryException {
AccumuloRdfConfiguration conf = (AccumuloRdfConfiguration) getConf(false);
- Set<RyaURI> propertySet = new HashSet<>();
- propertySet.add(new RyaURI("http://createdBy"));
+ Set<RyaIRI> propertySet = new HashSet<>();
+ propertySet.add(new RyaIRI("http://createdBy"));
conf.setStatementMetadataProperties(propertySet);
StatementMetadataExternalSetProvider metaProvider = new StatementMetadataExternalSetProvider(
conf);
@@ -88,8 +88,8 @@
public void createSingleMongoMetadataNode() throws MalformedQueryException {
MongoDBRdfConfiguration conf = (MongoDBRdfConfiguration) getConf(true);
- Set<RyaURI> propertySet = new HashSet<>();
- propertySet.add(new RyaURI("http://createdBy"));
+ Set<RyaIRI> propertySet = new HashSet<>();
+ propertySet.add(new RyaIRI("http://createdBy"));
conf.setStatementMetadataProperties(propertySet);
StatementMetadataExternalSetProvider metaProvider = new StatementMetadataExternalSetProvider(conf);
SPARQLParser parser = new SPARQLParser();
@@ -115,9 +115,9 @@
public void createMultipleMetadataNode() throws MalformedQueryException {
MongoDBRdfConfiguration conf = (MongoDBRdfConfiguration) getConf(true);
- Set<RyaURI> propertySet = new HashSet<>();
- propertySet.add(new RyaURI("http://createdBy"));
- propertySet.add(new RyaURI("http://createdOn"));
+ Set<RyaIRI> propertySet = new HashSet<>();
+ propertySet.add(new RyaIRI("http://createdBy"));
+ propertySet.add(new RyaIRI("http://createdOn"));
conf.setStatementMetadataProperties(propertySet);
StatementMetadataExternalSetProvider metaProvider = new StatementMetadataExternalSetProvider(conf);
SPARQLParser parser = new SPARQLParser();
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataOptimizerTest.java b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataOptimizerTest.java
index fba9652..5b6945f 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataOptimizerTest.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataOptimizerTest.java
@@ -30,7 +30,7 @@
import org.apache.rya.accumulo.AccumuloRdfConfiguration;
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.accumulo.ConfigUtils;
import org.apache.rya.indexing.external.matching.JoinSegment;
import org.apache.rya.indexing.statement.metadata.matching.StatementMetadataExternalSetProvider;
@@ -128,8 +128,8 @@
private static RdfCloudTripleStoreConfiguration getConf(boolean useMongo) {
RdfCloudTripleStoreConfiguration conf;
- Set<RyaURI> propertySet = new HashSet<>(
- Arrays.asList(new RyaURI("http://createdBy"), new RyaURI("http://createdOn")));
+ Set<RyaIRI> propertySet = new HashSet<>(
+ Arrays.asList(new RyaIRI("http://createdBy"), new RyaIRI("http://createdOn")));
if (useMongo) {
MongoDBRdfConfiguration mConf = new MongoDBRdfConfiguration();
mConf.setBoolean("sc.useMongo", true);
diff --git a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataTestUtils.java b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataTestUtils.java
index 51ea682..9c4cf6d 100644
--- a/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataTestUtils.java
+++ b/extras/indexing/src/test/java/org/apache/rya/indexing/statement/metadata/StatementMetadataTestUtils.java
@@ -23,7 +23,7 @@
import java.util.List;
import java.util.Set;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.statement.metadata.matching.OWLReify;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Value;
@@ -37,9 +37,9 @@
public class StatementMetadataTestUtils {
- private static final List<RyaURI> uriList = Arrays.asList(new RyaURI(RDF.TYPE.toString()),
- new RyaURI(OWLReify.SOURCE.toString()), new RyaURI(OWLReify.PROPERTY.toString()),
- new RyaURI(OWLReify.TARGET.toString()));
+ private static final List<RyaIRI> uriList = Arrays.asList(new RyaIRI(RDF.TYPE.toString()),
+ new RyaIRI(OWLReify.SOURCE.toString()), new RyaIRI(OWLReify.PROPERTY.toString()),
+ new RyaIRI(OWLReify.TARGET.toString()));
public static Set<QueryModelNode> getMetadataNodes(TupleExpr query) {
MetadataNodeCollector collector = new MetadataNodeCollector();
@@ -64,7 +64,7 @@
}
}
- public static Set<StatementPattern> getMetadataStatementPatterns(TupleExpr te, Set<RyaURI> properties) {
+ public static Set<StatementPattern> getMetadataStatementPatterns(TupleExpr te, Set<RyaIRI> properties) {
MetadataStatementPatternCollector collector = new MetadataStatementPatternCollector(properties);
te.visit(collector);
return collector.getNodes();
@@ -74,9 +74,9 @@
public static class MetadataStatementPatternCollector extends AbstractQueryModelVisitor<RuntimeException> {
private Set<StatementPattern> nodes;
- private Set<RyaURI> properties;
+ private Set<RyaIRI> properties;
- public MetadataStatementPatternCollector(Set<RyaURI> properties) {
+ public MetadataStatementPatternCollector(Set<RyaIRI> properties) {
this.properties = properties;
nodes = new HashSet<>();
}
@@ -86,7 +86,7 @@
Var predicate = node.getPredicateVar();
Value val = predicate.getValue();
if (val != null && val instanceof IRI) {
- RyaURI ryaVal = new RyaURI(val.stringValue());
+ RyaIRI ryaVal = new RyaIRI(val.stringValue());
if (uriList.contains(ryaVal) || properties.contains(ryaVal)) {
nodes.add(node);
}
diff --git a/extras/indexingExample/src/main/java/StatementMetadataExample.java b/extras/indexingExample/src/main/java/StatementMetadataExample.java
index 9f0afc9..56e8581 100644
--- a/extras/indexingExample/src/main/java/StatementMetadataExample.java
+++ b/extras/indexingExample/src/main/java/StatementMetadataExample.java
@@ -34,7 +34,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.indexing.accumulo.ConfigUtils;
@@ -111,25 +111,25 @@
+ "_:blankNode <http://createdOn> ?z }\n";
StatementMetadata metadata1 = new StatementMetadata();
- metadata1.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Dave"));
- metadata1.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-02"));
+ metadata1.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Dave"));
+ metadata1.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-02"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata1);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata1);
StatementMetadata metadata2 = new StatementMetadata();
- metadata2.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Dave"));
- metadata2.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
+ metadata2.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Dave"));
+ metadata2.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata2);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata2);
StatementMetadata metadata3 = new StatementMetadata();
- metadata3.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Fred"));
- metadata3.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-03-08"));
+ metadata3.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Fred"));
+ metadata3.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-03-08"));
- RyaStatement statement3 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("Library"), new RyaURI("http://context"), "", metadata3);
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("Library"), new RyaIRI("http://context"), "", metadata3);
// add statements for querying
dao.add(statement1);
@@ -176,12 +176,12 @@
+ "_:blankNode <http://hasTimeStamp> ?y }\n";
StatementMetadata metadata = new StatementMetadata();
- metadata.addMetadata(new RyaURI("http://hasTimeStamp"), new RyaType(XMLSchema.TIME, "09:30:10.5"));
+ metadata.addMetadata(new RyaIRI("http://hasTimeStamp"), new RyaType(XMLSchema.TIME, "09:30:10.5"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Doug"), new RyaURI("http://travelsTo"),
- new RyaURI("http://NewMexico"), new RyaURI("http://context"), "", metadata);
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://NewMexico"), new RyaURI("http://locatedWithin"),
- new RyaType("http://UnitedStates"), new RyaURI("http://context"), "", new StatementMetadata());
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Doug"), new RyaIRI("http://travelsTo"),
+ new RyaIRI("http://NewMexico"), new RyaIRI("http://context"), "", metadata);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://NewMexico"), new RyaIRI("http://locatedWithin"),
+ new RyaType("http://UnitedStates"), new RyaIRI("http://context"), "", new StatementMetadata());
// add statements for querying
dao.add(statement1);
@@ -223,25 +223,25 @@
+ "_:blankNode <http://createdOn> '2017-02-04'^^xsd:date }\n";
StatementMetadata metadata1 = new StatementMetadata();
- metadata1.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Dave"));
- metadata1.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-02"));
+ metadata1.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Dave"));
+ metadata1.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-02"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata1);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata1);
StatementMetadata metadata2 = new StatementMetadata();
- metadata2.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Dave"));
- metadata2.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
+ metadata2.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Dave"));
+ metadata2.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata2);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata2);
StatementMetadata metadata3 = new StatementMetadata();
- metadata3.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Fred"));
- metadata3.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-03-08"));
+ metadata3.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Fred"));
+ metadata3.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-03-08"));
- RyaStatement statement3 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("Library"), new RyaURI("http://context"), "", metadata3);
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("Library"), new RyaIRI("http://context"), "", metadata3);
// add statements for querying
dao.add(statement1);
@@ -293,32 +293,32 @@
+ "_:blankNode2 <http://createdOn> ?a }\n";
StatementMetadata metadata1 = new StatementMetadata();
- metadata1.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Dave"));
- metadata1.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-02"));
+ metadata1.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Dave"));
+ metadata1.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-01-02"));
- RyaStatement statement1 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("CoffeeShop"), new RyaURI("http://context"), "", metadata1);
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("CoffeeShop"), new RyaIRI("http://context"), "", metadata1);
StatementMetadata metadata2 = new StatementMetadata();
- metadata2.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Dave"));
- metadata2.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
+ metadata2.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Dave"));
+ metadata2.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-02-04"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata2);
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata2);
StatementMetadata metadata3 = new StatementMetadata();
- metadata3.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Fred"));
- metadata3.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-03-08"));
+ metadata3.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Fred"));
+ metadata3.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-03-08"));
- RyaStatement statement3 = new RyaStatement(new RyaURI("http://Joe"), new RyaURI("http://worksAt"),
- new RyaType("Library"), new RyaURI("http://context"), "", metadata3);
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("http://Joe"), new RyaIRI("http://worksAt"),
+ new RyaType("Library"), new RyaIRI("http://context"), "", metadata3);
StatementMetadata metadata4 = new StatementMetadata();
- metadata4.addMetadata(new RyaURI("http://createdBy"), new RyaURI("http://Dave"));
- metadata4.addMetadata(new RyaURI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-04-16"));
+ metadata4.addMetadata(new RyaIRI("http://createdBy"), new RyaIRI("http://Dave"));
+ metadata4.addMetadata(new RyaIRI("http://createdOn"), new RyaType(XMLSchema.DATE, "2017-04-16"));
- RyaStatement statement4 = new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://worksAt"),
- new RyaType("HardwareStore"), new RyaURI("http://context"), "", metadata4);
+ RyaStatement statement4 = new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://worksAt"),
+ new RyaType("HardwareStore"), new RyaIRI("http://context"), "", metadata4);
// add statements for querying
dao.add(statement1);
@@ -351,8 +351,8 @@
private static AccumuloRdfConfiguration getConf() {
AccumuloRdfConfiguration conf;
- Set<RyaURI> propertySet = new HashSet<RyaURI>(Arrays.asList(new RyaURI("http://createdBy"),
- new RyaURI("http://createdOn"), new RyaURI("http://hasTimeStamp")));
+ Set<RyaIRI> propertySet = new HashSet<RyaIRI>(Arrays.asList(new RyaIRI("http://createdBy"),
+ new RyaIRI("http://createdOn"), new RyaIRI("http://hasTimeStamp")));
conf = new AccumuloRdfConfiguration();
conf.setDisplayQueryPlan(false);
conf.setBoolean(ConfigUtils.USE_MOCK_INSTANCE, true);
diff --git a/extras/rya.export/export.accumulo/src/main/java/org/apache/rya/export/accumulo/util/AccumuloRyaUtils.java b/extras/rya.export/export.accumulo/src/main/java/org/apache/rya/export/accumulo/util/AccumuloRyaUtils.java
index 090d22f..7e8125c 100644
--- a/extras/rya.export/export.accumulo/src/main/java/org/apache/rya/export/accumulo/util/AccumuloRyaUtils.java
+++ b/extras/rya.export/export.accumulo/src/main/java/org/apache/rya/export/accumulo/util/AccumuloRyaUtils.java
@@ -54,7 +54,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaTripleContext;
@@ -89,41 +89,41 @@
}
/**
- * Creates a {@link RyaURI} for the specified local name.
- * @param localName the URI's local name.
- * @return the {@link RyaURI}.
+ * Creates a {@link RyaIRI} for the specified local name.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- public static RyaURI createRyaUri(final String localName) {
- return createRyaUri(NAMESPACE, localName);
+ public static RyaIRI createRyaIri(final String localName) {
+ return createRyaIri(NAMESPACE, localName);
}
/**
- * Creates a {@link RyaURI} for the specified local name.
+ * Creates a {@link RyaIRI} for the specified local name.
* @param namespace the namespace.
- * @param localName the URI's local name.
- * @return the {@link RyaURI}.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- public static RyaURI createRyaUri(final String namespace, final String localName) {
- return RdfToRyaConversions.convertURI(VALUE_FACTORY.createIRI(namespace, localName));
+ public static RyaIRI createRyaIri(final String namespace, final String localName) {
+ return RdfToRyaConversions.convertIRI(VALUE_FACTORY.createIRI(namespace, localName));
}
/**
- * Converts a {@link RyaURI} to the contained data string.
- * @param the {@link RyaURI} to convert.
+ * Converts a {@link RyaIRI} to the contained data string.
+ * @param ryaIri the {@link RyaIRI} to convert.
* @return the data value without the namespace.
*/
- public static String convertRyaUriToString(final RyaURI ryaUri) {
- return convertRyaUriToString(NAMESPACE, ryaUri);
+ public static String convertRyaIriToString(final RyaIRI ryaIri) {
+ return convertRyaIriToString(NAMESPACE, ryaIri);
}
/**
- * Converts a {@link RyaURI} to the contained data string.
+ * Converts a {@link RyaIRI} to the contained data string.
* @param namespace the namespace.
- * @param the {@link RyaURI} to convert.
+ * @param ryaIri the {@link RyaIRI} to convert.
* @return the data value without the namespace.
*/
- public static String convertRyaUriToString(final String namespace, final RyaURI ryaUri) {
- return StringUtils.replaceOnce(ryaUri.getData(), namespace, "");
+ public static String convertRyaIriToString(final String namespace, final RyaIRI ryaIri) {
+ return StringUtils.replaceOnce(ryaIri.getData(), namespace, "");
}
/**
diff --git a/extras/rya.export/export.accumulo/src/test/java/org/apache/rya/export/accumulo/AccumuloRyaStatementStoreTest.java b/extras/rya.export/export.accumulo/src/test/java/org/apache/rya/export/accumulo/AccumuloRyaStatementStoreTest.java
index 7c2ff83..cdbd0a6 100644
--- a/extras/rya.export/export.accumulo/src/test/java/org/apache/rya/export/accumulo/AccumuloRyaStatementStoreTest.java
+++ b/extras/rya.export/export.accumulo/src/test/java/org/apache/rya/export/accumulo/AccumuloRyaStatementStoreTest.java
@@ -272,10 +272,10 @@
assertEquals(firstRyaStatement, updatedRyaStatement);
- final String subject = TestUtils.convertRyaUriToString(updatedRyaStatement.getSubject());
- final String predicate = TestUtils.convertRyaUriToString(updatedRyaStatement.getPredicate());
- updatedRyaStatement.setSubject(TestUtils.createRyaUri(subject + "_UPDATED"));
- updatedRyaStatement.setPredicate(TestUtils.createRyaUri(predicate + "_UPDATED"));
+ final String subject = TestUtils.convertRyaIriToString(updatedRyaStatement.getSubject());
+ final String predicate = TestUtils.convertRyaIriToString(updatedRyaStatement.getPredicate());
+ updatedRyaStatement.setSubject(TestUtils.createRyaIri(subject + "_UPDATED"));
+ updatedRyaStatement.setPredicate(TestUtils.createRyaIri(predicate + "_UPDATED"));
accumuloRyaStatementStore.updateStatement(firstRyaStatement, updatedRyaStatement);
@@ -312,10 +312,10 @@
assertEquals(firstRyaStatement, updatedRyaStatement);
- final String subject = TestUtils.convertRyaUriToString(updatedRyaStatement.getSubject());
- final String predicate = TestUtils.convertRyaUriToString(updatedRyaStatement.getPredicate());
- updatedRyaStatement.setSubject(TestUtils.createRyaUri(subject + "_UPDATED"));
- updatedRyaStatement.setPredicate(TestUtils.createRyaUri(predicate + "_UPDATED"));
+ final String subject = TestUtils.convertRyaIriToString(updatedRyaStatement.getSubject());
+ final String predicate = TestUtils.convertRyaIriToString(updatedRyaStatement.getPredicate());
+ updatedRyaStatement.setSubject(TestUtils.createRyaIri(subject + "_UPDATED"));
+ updatedRyaStatement.setPredicate(TestUtils.createRyaIri(predicate + "_UPDATED"));
accumuloRyaStatementStore.updateStatement(firstRyaStatement, null);
}
@@ -333,10 +333,10 @@
assertEquals(notFoundStatement, updatedRyaStatement);
- final String subject = TestUtils.convertRyaUriToString(updatedRyaStatement.getSubject());
- final String predicate = TestUtils.convertRyaUriToString(updatedRyaStatement.getPredicate());
- updatedRyaStatement.setSubject(TestUtils.createRyaUri(subject + "_UPDATED"));
- updatedRyaStatement.setPredicate(TestUtils.createRyaUri(predicate + "_UPDATED"));
+ final String subject = TestUtils.convertRyaIriToString(updatedRyaStatement.getSubject());
+ final String predicate = TestUtils.convertRyaIriToString(updatedRyaStatement.getPredicate());
+ updatedRyaStatement.setSubject(TestUtils.createRyaIri(subject + "_UPDATED"));
+ updatedRyaStatement.setPredicate(TestUtils.createRyaIri(predicate + "_UPDATED"));
accumuloRyaStatementStore.updateStatement(notFoundStatement, updatedRyaStatement);
diff --git a/extras/rya.export/export.accumulo/src/test/java/org/apache/rya/export/accumulo/TestUtils.java b/extras/rya.export/export.accumulo/src/test/java/org/apache/rya/export/accumulo/TestUtils.java
index 34d1ba9..d0a00c6 100644
--- a/extras/rya.export/export.accumulo/src/test/java/org/apache/rya/export/accumulo/TestUtils.java
+++ b/extras/rya.export/export.accumulo/src/test/java/org/apache/rya/export/accumulo/TestUtils.java
@@ -21,7 +21,7 @@
import java.util.Date;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.export.accumulo.util.AccumuloRyaUtils;
/**
@@ -31,22 +31,21 @@
private static final String NAMESPACE = "#:";
/**
- * Creates a {@link RyaURI} for the specified local name.
- * @param localName the URI's local name.
- * @return the {@link RyraURI}.
+ * Creates a {@link RyaIRI} for the specified local name.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- public static RyaURI createRyaUri(final String localName) {
- return AccumuloRyaUtils.createRyaUri(NAMESPACE, localName);
+ public static RyaIRI createRyaIri(final String localName) {
+ return AccumuloRyaUtils.createRyaIri(NAMESPACE, localName);
}
/**
- * Converts a {@link RyaURI} to the contained data string.
- * @param namespace the namespace.
- * @param the {@link RyaURI} to convert.
+ * Converts a {@link RyaIRI} to the contained data string.
+ * @param ryaIri the {@link RyaIRI} to convert.
* @return the data value without the namespace.
*/
- public static String convertRyaUriToString(final RyaURI RyaUri) {
- return AccumuloRyaUtils.convertRyaUriToString(NAMESPACE, RyaUri);
+ public static String convertRyaIriToString(final RyaIRI ryaIri) {
+ return AccumuloRyaUtils.convertRyaIriToString(NAMESPACE, ryaIri);
}
/**
@@ -58,10 +57,10 @@
* @return the {@link RyaStatement}.
*/
public static RyaStatement createRyaStatement(final String subject, final String predicate, final String object, final Date date) {
- final RyaURI subjectUri = createRyaUri(subject);
- final RyaURI predicateUri = createRyaUri(predicate);
- final RyaURI objectUri = createRyaUri(object);
- final RyaStatement ryaStatement = new RyaStatement(subjectUri, predicateUri, objectUri);
+ final RyaIRI subjectIri = createRyaIri(subject);
+ final RyaIRI predicateIri = createRyaIri(predicate);
+ final RyaIRI objectIri = createRyaIri(object);
+ final RyaStatement ryaStatement = new RyaStatement(subjectIri, predicateIri, objectIri);
if (date != null) {
ryaStatement.setTimestamp(date.getTime());
}
diff --git a/extras/rya.export/export.integration/src/test/java/org/apache/rya/indexing/export/ITBase.java b/extras/rya.export/export.integration/src/test/java/org/apache/rya/indexing/export/ITBase.java
index 83fd774..4b7d3f9 100644
--- a/extras/rya.export/export.integration/src/test/java/org/apache/rya/indexing/export/ITBase.java
+++ b/extras/rya.export/export.integration/src/test/java/org/apache/rya/indexing/export/ITBase.java
@@ -35,7 +35,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaStatement.RyaStatementBuilder;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.indexing.accumulo.ConfigUtils;
@@ -159,11 +159,11 @@
checkNotNull(predicate);
checkNotNull(object);
- final RyaStatementBuilder builder = RyaStatement.builder().setSubject(new RyaURI(subject))
- .setPredicate(new RyaURI(predicate));
+ final RyaStatementBuilder builder = RyaStatement.builder().setSubject(new RyaIRI(subject))
+ .setPredicate(new RyaIRI(predicate));
if (object.startsWith("http://")) {
- builder.setObject(new RyaURI(object));
+ builder.setObject(new RyaIRI(object));
} else {
builder.setObject(new RyaType(object));
}
@@ -188,7 +188,7 @@
checkNotNull(subject);
checkNotNull(predicate);
- return RyaStatement.builder().setSubject(new RyaURI(subject)).setPredicate(new RyaURI(predicate))
+ return RyaStatement.builder().setSubject(new RyaIRI(subject)).setPredicate(new RyaIRI(predicate))
.setObject(new RyaType(XMLSchema.INT, "" + object)).build();
}
diff --git a/extras/rya.forwardchain/src/main/java/org/apache/rya/forwardchain/ForwardChainConstants.java b/extras/rya.forwardchain/src/main/java/org/apache/rya/forwardchain/ForwardChainConstants.java
index d4ae96f..5220ea5 100644
--- a/extras/rya.forwardchain/src/main/java/org/apache/rya/forwardchain/ForwardChainConstants.java
+++ b/extras/rya.forwardchain/src/main/java/org/apache/rya/forwardchain/ForwardChainConstants.java
@@ -20,7 +20,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaSchema;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.ValueFactory;
@@ -32,6 +32,6 @@
public static final IRI DERIVATION_TIME = VF.createIRI(NAMESPACE, "forwardChainIteration");
public static final IRI DERIVATION_RULE = VF.createIRI(NAMESPACE, "forwardChainRule");
- public static final RyaURI RYA_DERIVATION_RULE = RdfToRyaConversions.convertURI(DERIVATION_RULE);
- public static final RyaURI RYA_DERIVATION_TIME = RdfToRyaConversions.convertURI(DERIVATION_TIME);
+ public static final RyaIRI RYA_DERIVATION_RULE = RdfToRyaConversions.convertIRI(DERIVATION_RULE);
+ public static final RyaIRI RYA_DERIVATION_TIME = RdfToRyaConversions.convertIRI(DERIVATION_TIME);
}
diff --git a/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/model/Event.java b/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/model/Event.java
index 4c50bfb..13ea048 100644
--- a/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/model/Event.java
+++ b/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/model/Event.java
@@ -23,7 +23,7 @@
import java.util.Objects;
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.TemporalInstant;
import org.apache.rya.indexing.TemporalInterval;
import org.apache.rya.indexing.geotemporal.GeoTemporalIndexer;
@@ -42,7 +42,7 @@
private final Optional<Geometry> geometry;
private final Optional<TemporalInstant> instant;
private final Optional<TemporalInterval> interval;
- private final RyaURI subject;
+ private final RyaIRI subject;
private final boolean isInstant;
@@ -52,7 +52,7 @@
* @param instant - The {@link TemporalInstant} to use when querying.
* @param subject - The Subject that both statements must have when querying.
*/
- private Event(final Geometry geo, final TemporalInstant instant, final RyaURI subject) {
+ private Event(final Geometry geo, final TemporalInstant instant, final RyaIRI subject) {
this.subject = requireNonNull(subject);
//these fields are nullable since they are filled field by field.
@@ -68,7 +68,7 @@
* @param interval - The {@link TemporalInterval} to use when querying.
* @param subject - The Subject that both statements must have when querying.
*/
- private Event(final Geometry geo, final TemporalInterval interval, final RyaURI subject) {
+ private Event(final Geometry geo, final TemporalInterval interval, final RyaIRI subject) {
this.subject = requireNonNull(subject);
//these fields are nullable since they are filled field by field.
@@ -109,7 +109,7 @@
/**
* @return The statement subject.
*/
- public RyaURI getSubject() {
+ public RyaIRI getSubject() {
return subject;
}
@@ -163,16 +163,16 @@
*/
@DefaultAnnotation(NonNull.class)
public static class Builder {
- private RyaURI subject;
+ private RyaIRI subject;
private Geometry geo;
private TemporalInstant instant;
private TemporalInterval interval;
/**
- * Sets the {@link RyaURI} subject.
+ * Sets the {@link RyaIRI} subject.
* @param subject - The subject to key on the event.
*/
- public Builder setSubject(final RyaURI subject) {
+ public Builder setSubject(final RyaIRI subject) {
this.subject = subject;
return this;
}
diff --git a/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/model/EventQueryNode.java b/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/model/EventQueryNode.java
index 53d4b74..4110d43 100644
--- a/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/model/EventQueryNode.java
+++ b/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/model/EventQueryNode.java
@@ -30,7 +30,7 @@
import java.util.Set;
import org.apache.commons.lang.builder.EqualsBuilder;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.IndexingExpr;
import org.apache.rya.indexing.TemporalInstant;
import org.apache.rya.indexing.TemporalInstantRfc3339;
@@ -179,7 +179,7 @@
if(subjectConstant.isPresent()) {
// if it is, fetch that value and then fetch the entity for the subject.
subj = subjectConstant.get();
- searchEvents = eventStore.search(Optional.of(new RyaURI(subj)), Optional.of(geoFilters), Optional.of(temporalFilters));
+ searchEvents = eventStore.search(Optional.of(new RyaIRI(subj)), Optional.of(geoFilters), Optional.of(temporalFilters));
} else {
searchEvents = eventStore.search(Optional.empty(), Optional.of(geoFilters), Optional.of(temporalFilters));
}
diff --git a/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/storage/EventStorage.java b/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/storage/EventStorage.java
index 47c18a0..5529960 100644
--- a/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/storage/EventStorage.java
+++ b/extras/rya.geoindexing/geo.common/src/main/java/org/apache/rya/indexing/geotemporal/storage/EventStorage.java
@@ -21,7 +21,7 @@
import java.util.Collection;
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.IndexingExpr;
import org.apache.rya.indexing.geotemporal.GeoTemporalIndexer;
import org.apache.rya.indexing.geotemporal.model.Event;
@@ -38,7 +38,7 @@
* @return The {@link Event}, if one exists for the subject.
* @throws ObjectStorageException A problem occurred while fetching the Entity from the storage.
*/
- public Collection<Event> search(final Optional<RyaURI> subject, Optional<Collection<IndexingExpr>> geoFilters, Optional<Collection<IndexingExpr>> temporalFilters) throws ObjectStorageException;
+ public Collection<Event> search(final Optional<RyaIRI> subject, Optional<Collection<IndexingExpr>> geoFilters, Optional<Collection<IndexingExpr>> temporalFilters) throws ObjectStorageException;
/**
* Indicates a problem while interacting with an {@link EventStorage}.
diff --git a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/EventDocumentConverter.java b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/EventDocumentConverter.java
index 926f357..f44699d 100644
--- a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/EventDocumentConverter.java
+++ b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/EventDocumentConverter.java
@@ -23,7 +23,7 @@
import java.util.Date;
import java.util.List;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.TemporalInstant;
import org.apache.rya.indexing.TemporalInstantRfc3339;
import org.apache.rya.indexing.TemporalInterval;
@@ -97,7 +97,7 @@
final String subject = document.getString(SUBJECT);
final Event.Builder builder = new Event.Builder()
- .setSubject(new RyaURI(subject));
+ .setSubject(new RyaIRI(subject));
if(document.containsKey(GEO_KEY)) {
final Document geoObj = (Document) document.get(GEO_KEY);
diff --git a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/EventUpdater.java b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/EventUpdater.java
index 1c62407..e41f405 100644
--- a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/EventUpdater.java
+++ b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/EventUpdater.java
@@ -22,7 +22,7 @@
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.geotemporal.model.Event;
import org.apache.rya.indexing.geotemporal.storage.EventStorage;
import org.apache.rya.indexing.geotemporal.storage.EventStorage.EventStorageException;
@@ -36,7 +36,7 @@
* Performs update operations over an {@link EventStorage}.
*/
@DefaultAnnotation(NonNull.class)
-public class EventUpdater implements MongoDocumentUpdater<RyaURI, Event>{
+public class EventUpdater implements MongoDocumentUpdater<RyaIRI, Event>{
private final EventStorage events;
/**
@@ -49,7 +49,7 @@
}
@Override
- public Optional<Event> getOld(final RyaURI key) throws EventStorageException {
+ public Optional<Event> getOld(final RyaIRI key) throws EventStorageException {
try {
return events.get(key);
} catch (final ObjectStorageException e) {
diff --git a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/MongoEventStorage.java b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/MongoEventStorage.java
index 9c13c8b..d7b1850 100644
--- a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/MongoEventStorage.java
+++ b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/MongoEventStorage.java
@@ -27,7 +27,7 @@
import java.util.Optional;
import java.util.Set;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.IndexingExpr;
import org.apache.rya.indexing.entity.model.TypedEntity;
import org.apache.rya.indexing.entity.storage.mongo.DocumentConverter.DocumentConverterException;
@@ -100,7 +100,7 @@
}
@Override
- public Optional<Event> get(final RyaURI subject) throws EventStorageException {
+ public Optional<Event> get(final RyaIRI subject) throws EventStorageException {
requireNonNull(subject);
try {
@@ -119,7 +119,7 @@
}
@Override
- public Collection<Event> search(final Optional<RyaURI> subject, final Optional<Collection<IndexingExpr>> geoFilters, final Optional<Collection<IndexingExpr>> temporalFilters) throws EventStorageException {
+ public Collection<Event> search(final Optional<RyaIRI> subject, final Optional<Collection<IndexingExpr>> geoFilters, final Optional<Collection<IndexingExpr>> temporalFilters) throws EventStorageException {
requireNonNull(subject);
try {
@@ -174,7 +174,7 @@
}
@Override
- public boolean delete(final RyaURI subject) throws EventStorageException {
+ public boolean delete(final RyaIRI subject) throws EventStorageException {
requireNonNull(subject);
try {
@@ -189,7 +189,7 @@
}
}
- private static Bson makeSubjectFilter(final RyaURI subject) {
+ private static Bson makeSubjectFilter(final RyaIRI subject) {
return Filters.eq(EventDocumentConverter.SUBJECT, subject.getData());
}
}
diff --git a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/MongoGeoTemporalIndexer.java b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/MongoGeoTemporalIndexer.java
index bc836bd..4e53481 100644
--- a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/MongoGeoTemporalIndexer.java
+++ b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geotemporal/mongo/MongoGeoTemporalIndexer.java
@@ -30,7 +30,7 @@
import org.apache.hadoop.conf.Configuration;
import org.apache.log4j.Logger;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.indexing.GeoConstants;
import org.apache.rya.indexing.TemporalInstant;
@@ -112,7 +112,7 @@
@Override
public void deleteStatement(final RyaStatement statement) throws IOException {
requireNonNull(statement);
- final RyaURI subject = statement.getSubject();
+ final RyaIRI subject = statement.getSubject();
try {
final EventStorage eventStore = events.get();
checkState(events != null, "Must set this indexers configuration before storing statements.");
@@ -161,7 +161,7 @@
}
}
- private void updateEvent(final RyaURI subject, final RyaStatement statement) throws IndexingException, ParseException {
+ private void updateEvent(final RyaIRI subject, final RyaStatement statement) throws IndexingException, ParseException {
final EventStorage eventStore = events.get();
checkState(events != null, "Must set this indexers configuration before storing statements.");
diff --git a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/MongoGeoTemporalIndexIT.java b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/MongoGeoTemporalIndexIT.java
index 316117b..f49252a 100644
--- a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/MongoGeoTemporalIndexIT.java
+++ b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/MongoGeoTemporalIndexIT.java
@@ -27,7 +27,7 @@
import java.util.Optional;
import java.util.Set;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.GeoConstants;
import org.apache.rya.indexing.GeoRyaSailFactory;
import org.apache.rya.indexing.TemporalInstantRfc3339;
@@ -70,7 +70,7 @@
addStatements(repo.getConnection());
final EventStorage events = indexer.getEventStorage();
- final RyaURI subject = new RyaURI("urn:event1");
+ final RyaIRI subject = new RyaIRI("urn:event1");
final Optional<Event> event = events.get(subject);
assertTrue(event.isPresent());
} finally {
diff --git a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/model/EventQueryNode2IT.java b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/model/EventQueryNode2IT.java
index cfcb513..e27b720 100644
--- a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/model/EventQueryNode2IT.java
+++ b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/model/EventQueryNode2IT.java
@@ -30,7 +30,7 @@
import java.util.Arrays;
import java.util.List;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.IndexingExpr;
import org.apache.rya.indexing.IndexingFunctionRegistry;
import org.apache.rya.indexing.IndexingFunctionRegistry.FUNCTION_TYPE;
@@ -114,7 +114,7 @@
@Test
public void evaluate_constantSubject() throws Exception {
final EventStorage storage = new MongoEventStorage(super.getMongoClient(), "testDB");
- RyaURI subject = new RyaURI("urn:event-1111");
+ RyaIRI subject = new RyaIRI("urn:event-1111");
final Geometry geo = GF.createPoint(new Coordinate(1, 1));
final TemporalInstant temp = new TemporalInstantRfc3339(2015, 12, 30, 12, 00, 0);
final Event event = Event.builder()
@@ -123,7 +123,7 @@
.setTemporalInstant(temp)
.build();
- subject = new RyaURI("urn:event-2222");
+ subject = new RyaIRI("urn:event-2222");
final Event otherEvent = Event.builder()
.setSubject(subject)
.setGeometry(geo)
@@ -163,7 +163,7 @@
@Test
public void evaluate_variableSubject() throws Exception {
final EventStorage storage = new MongoEventStorage(super.getMongoClient(), "testDB");
- RyaURI subject = new RyaURI("urn:event-1111");
+ RyaIRI subject = new RyaIRI("urn:event-1111");
Geometry geo = GF.createPoint(new Coordinate(1, 1));
final TemporalInstant temp = new TemporalInstantRfc3339(2015, 12, 30, 12, 00, 0);
final Event event = Event.builder()
@@ -172,7 +172,7 @@
.setTemporalInstant(temp)
.build();
- subject = new RyaURI("urn:event-2222");
+ subject = new RyaIRI("urn:event-2222");
geo = GF.createPoint(new Coordinate(-1, -1));
final Event otherEvent = Event.builder()
.setSubject(subject)
@@ -217,7 +217,7 @@
@Test
public void evaluate_variableSubject_existingBindingset() throws Exception {
final EventStorage storage = new MongoEventStorage(super.getMongoClient(), "testDB");
- RyaURI subject = new RyaURI("urn:event-1111");
+ RyaIRI subject = new RyaIRI("urn:event-1111");
Geometry geo = GF.createPoint(new Coordinate(1, 1));
final TemporalInstant temp = new TemporalInstantRfc3339(2015, 12, 30, 12, 00, 0);
final Event event = Event.builder()
@@ -226,7 +226,7 @@
.setTemporalInstant(temp)
.build();
- subject = new RyaURI("urn:event-2222");
+ subject = new RyaIRI("urn:event-2222");
geo = GF.createPoint(new Coordinate(-1, -1));
final Event otherEvent = Event.builder()
.setSubject(subject)
@@ -269,7 +269,7 @@
@Test
public void evaluate_variableSubject_existingBindingsetWrongFilters() throws Exception {
final EventStorage storage = new MongoEventStorage(super.getMongoClient(), "testDB");
- RyaURI subject = new RyaURI("urn:event-1111");
+ RyaIRI subject = new RyaIRI("urn:event-1111");
Geometry geo = GF.createPoint(new Coordinate(1, 1));
final TemporalInstant temp = new TemporalInstantRfc3339(2015, 12, 30, 12, 00, 0);
final Event event = Event.builder()
@@ -278,7 +278,7 @@
.setTemporalInstant(temp)
.build();
- subject = new RyaURI("urn:event-2222");
+ subject = new RyaIRI("urn:event-2222");
geo = GF.createPoint(new Coordinate(-10, -10));
final Event otherEvent = Event.builder()
.setSubject(subject)
@@ -319,11 +319,11 @@
final List<StatementPattern> sps = getSps(query);
final List<FunctionCall> filters = getFilters(query);
for(final FunctionCall filter : filters) {
- final IRI filterURI = VF.createIRI(filter.getURI());
- final Var objVar = IndexingFunctionRegistry.getResultVarFromFunctionCall(filterURI, filter.getArgs());
+ final IRI filterIRI = VF.createIRI(filter.getURI());
+ final Var objVar = IndexingFunctionRegistry.getResultVarFromFunctionCall(filterIRI, filter.getArgs());
final Value[] arguments = extractArguments(objVar.getName(), filter);
- final IndexingExpr expr = new IndexingExpr(filterURI, sps.get(0), Arrays.stream(arguments).toArray());
- if(IndexingFunctionRegistry.getFunctionType(filterURI) == FUNCTION_TYPE.GEO) {
+ final IndexingExpr expr = new IndexingExpr(filterIRI, sps.get(0), Arrays.stream(arguments).toArray());
+ if(IndexingFunctionRegistry.getFunctionType(filterIRI) == FUNCTION_TYPE.GEO) {
geoFilters.add(expr);
} else {
temporalFilters.add(expr);
diff --git a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/EventDocumentConverterTest.java b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/EventDocumentConverterTest.java
index 3f2f9d5..fa6ce85 100644
--- a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/EventDocumentConverterTest.java
+++ b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/EventDocumentConverterTest.java
@@ -20,7 +20,7 @@
import static org.junit.Assert.assertEquals;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.TemporalInstant;
import org.apache.rya.indexing.TemporalInstantRfc3339;
import org.apache.rya.indexing.entity.storage.mongo.DocumentConverter.DocumentConverterException;
@@ -48,7 +48,7 @@
// An Event that will be stored.
final Event event = Event.builder()
- .setSubject(new RyaURI("urn:event/001"))
+ .setSubject(new RyaIRI("urn:event/001"))
.setGeometry(geo)
.setTemporalInstant(instant)
.build();
diff --git a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/GeoTemporalMongoDBStorageStrategyTest.java b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/GeoTemporalMongoDBStorageStrategyTest.java
index f18b1da..b50fddb 100644
--- a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/GeoTemporalMongoDBStorageStrategyTest.java
+++ b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/GeoTemporalMongoDBStorageStrategyTest.java
@@ -315,11 +315,11 @@
final List<StatementPattern> sps = getSps(query);
final List<FunctionCall> filters = getFilters(query);
for(final FunctionCall filter : filters) {
- final IRI filterURI = VF.createIRI(filter.getURI());
- final Var objVar = IndexingFunctionRegistry.getResultVarFromFunctionCall(filterURI, filter.getArgs());
+ final IRI filterIRI = VF.createIRI(filter.getURI());
+ final Var objVar = IndexingFunctionRegistry.getResultVarFromFunctionCall(filterIRI, filter.getArgs());
final Value[] arguments = extractArguments(objVar.getName(), filter);
- final IndexingExpr expr = new IndexingExpr(filterURI, sps.get(0), Arrays.stream(arguments).toArray());
- if(IndexingFunctionRegistry.getFunctionType(filterURI) == FUNCTION_TYPE.GEO) {
+ final IndexingExpr expr = new IndexingExpr(filterIRI, sps.get(0), Arrays.stream(arguments).toArray());
+ if(IndexingFunctionRegistry.getFunctionType(filterIRI) == FUNCTION_TYPE.GEO) {
geoFilters.add(expr);
} else {
temporalFilters.add(expr);
diff --git a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoEventStorageIT.java b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoEventStorageIT.java
index c7d8a81..a10f05e 100644
--- a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoEventStorageIT.java
+++ b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoEventStorageIT.java
@@ -24,7 +24,7 @@
import java.util.Optional;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.TemporalInstant;
import org.apache.rya.indexing.TemporalInstantRfc3339;
import org.apache.rya.indexing.geotemporal.model.Event;
@@ -55,7 +55,7 @@
// An Event that will be stored.
final Event event = Event.builder()
- .setSubject(new RyaURI("urn:event/001"))
+ .setSubject(new RyaIRI("urn:event/001"))
.setGeometry(geo)
.setTemporalInstant(instant)
.build();
@@ -65,7 +65,7 @@
storage.create(event);
// Get it.
- final Optional<Event> storedEvent = storage.get(new RyaURI("urn:event/001"));
+ final Optional<Event> storedEvent = storage.get(new RyaIRI("urn:event/001"));
// Verify the correct value was returned.
assertEquals(event, storedEvent.get());
@@ -78,7 +78,7 @@
// An Event that will be stored.
final Event event = Event.builder()
- .setSubject(new RyaURI("urn:event/001"))
+ .setSubject(new RyaIRI("urn:event/001"))
.setGeometry(geo)
.setTemporalInstant(instant)
.build();
@@ -101,7 +101,7 @@
public void get_noneExisting() throws Exception {
// Get a Type that hasn't been created.
final EventStorage storage = new MongoEventStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
- final Optional<Event> storedEvent = storage.get(new RyaURI("urn:event/000"));
+ final Optional<Event> storedEvent = storage.get(new RyaIRI("urn:event/000"));
// Verify nothing was returned.
assertFalse(storedEvent.isPresent());
@@ -114,7 +114,7 @@
// An Event that will be stored.
final Event event = Event.builder()
- .setSubject(new RyaURI("urn:event/002"))
+ .setSubject(new RyaIRI("urn:event/002"))
.setGeometry(geo)
.setTemporalInstant(instant)
.build();
@@ -124,7 +124,7 @@
storage.create(event);
// Delete it.
- final boolean deleted = storage.delete( new RyaURI("urn:event/002") );
+ final boolean deleted = storage.delete( new RyaIRI("urn:event/002") );
// Verify a document was deleted.
assertTrue( deleted );
@@ -134,7 +134,7 @@
public void delete_nonExisting() throws Exception {
// Delete an Event that has not been created.
final EventStorage storage = new MongoEventStorage(super.getMongoClient(), RYA_INSTANCE_NAME);
- final boolean deleted = storage.delete( new RyaURI("urn:event/003") );
+ final boolean deleted = storage.delete( new RyaIRI("urn:event/003") );
// Verify no document was deleted.
assertFalse( deleted );
@@ -148,7 +148,7 @@
// An Event that will be stored.
final Event event = Event.builder()
- .setSubject(new RyaURI("urn:event/004"))
+ .setSubject(new RyaIRI("urn:event/004"))
.setGeometry(geo)
.setTemporalInstant(instant)
.build();
@@ -156,7 +156,7 @@
storage.create(event);
// Show Alice was stored.
- Optional<Event> latest = storage.get(new RyaURI("urn:event/004"));
+ Optional<Event> latest = storage.get(new RyaIRI("urn:event/004"));
assertEquals(event, latest.get());
instant = new TemporalInstantRfc3339(DateTime.now());
@@ -168,7 +168,7 @@
storage.update(event, updated);
// Fetch the Alice object and ensure it has the new value.
- latest = storage.get(new RyaURI("urn:event/004"));
+ latest = storage.get(new RyaIRI("urn:event/004"));
assertEquals(updated, latest.get());
}
@@ -181,13 +181,13 @@
// Two objects that do not have the same Subjects.
final Event old = Event.builder()
- .setSubject(new RyaURI("urn:event/001"))
+ .setSubject(new RyaIRI("urn:event/001"))
.setGeometry(geo)
.setTemporalInstant(instant)
.build();
final Event updated = Event.builder()
- .setSubject(new RyaURI("urn:event/002"))
+ .setSubject(new RyaIRI("urn:event/002"))
.setGeometry(geo)
.setTemporalInstant(instant)
.build();
diff --git a/extras/rya.giraph/src/test/java/org/apache/rya/giraph/format/TestVertexFormat.java b/extras/rya.giraph/src/test/java/org/apache/rya/giraph/format/TestVertexFormat.java
index 920e876..25aafee 100644
--- a/extras/rya.giraph/src/test/java/org/apache/rya/giraph/format/TestVertexFormat.java
+++ b/extras/rya.giraph/src/test/java/org/apache/rya/giraph/format/TestVertexFormat.java
@@ -34,7 +34,7 @@
import org.apache.rya.accumulo.AccumuloRyaDAO;
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.giraph.format.RyaVertexInputFormat;
import org.apache.rya.indexing.accumulo.ConfigUtils;
import org.apache.rya.sail.config.RyaSailFactory;
@@ -83,18 +83,18 @@
AccumuloRdfConfiguration conf = getConf();
AccumuloRyaDAO ryaDAO = RyaSailFactory.getAccumuloDAO(conf);
- ryaDAO.add(new RyaStatement(new RyaURI("urn:test#1234"),
- new RyaURI("urn:test#pred1"),
- new RyaURI("urn:test#obj1")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:test#1234"),
- new RyaURI("urn:test#pred2"),
- new RyaURI("urn:test#obj2")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:test#1234"),
- new RyaURI("urn:test#pred3"),
- new RyaURI("urn:test#obj3")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:test#1234"),
- new RyaURI("urn:test#pred4"),
- new RyaURI("urn:test#obj4")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:test#1234"),
+ new RyaIRI("urn:test#pred1"),
+ new RyaIRI("urn:test#obj1")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:test#1234"),
+ new RyaIRI("urn:test#pred2"),
+ new RyaIRI("urn:test#obj2")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:test#1234"),
+ new RyaIRI("urn:test#pred3"),
+ new RyaIRI("urn:test#obj3")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:test#1234"),
+ new RyaIRI("urn:test#pred4"),
+ new RyaIRI("urn:test#obj4")));
ryaDAO.flush();
GiraphJob job = new GiraphJob(conf, getCallingMethodName());
diff --git a/extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/BindingSetStringConverter.java b/extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/BindingSetStringConverter.java
index 4cf54dc..4647b8b 100644
--- a/extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/BindingSetStringConverter.java
+++ b/extras/rya.indexing.pcj/src/main/java/org/apache/rya/indexing/pcj/storage/accumulo/BindingSetStringConverter.java
@@ -123,10 +123,10 @@
final String typeString = valueAndType[1];
// Convert the String Type into a IRI that describes the type.
- final IRI typeURI = VF.createIRI(typeString);
+ final IRI typeIRI = VF.createIRI(typeString);
// Convert the String Value into a Value.
- final Value value = typeURI.equals(XMLSchema.ANYURI) ?
+ final Value value = typeIRI.equals(XMLSchema.ANYURI) ?
VF.createIRI(dataString) :
VF.createLiteral(dataString, VF.createIRI(typeString));
diff --git a/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/util/AccumuloRyaUtils.java b/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/util/AccumuloRyaUtils.java
index 8a02672..12e4098 100644
--- a/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/util/AccumuloRyaUtils.java
+++ b/extras/rya.merger/src/main/java/org/apache/rya/accumulo/mr/merge/util/AccumuloRyaUtils.java
@@ -56,7 +56,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.indexing.accumulo.ConfigUtils;
@@ -85,10 +85,10 @@
private static final String NAMESPACE = RdfCloudTripleStoreConstants.NAMESPACE;
private static final ValueFactory VALUE_FACTORY = RdfCloudTripleStoreConstants.VALUE_FACTORY;
- public static RyaURI RTS_SUBJECT_RYA = RdfCloudTripleStoreConstants.RTS_SUBJECT_RYA;
- public static RyaURI RTS_COPY_TOOL_RUN_TIME_PREDICATE_RYA = createRyaUri(COPY_TOOL_RUN_TIME_LOCAL_NAME);
- public static RyaURI RTS_COPY_TOOL_SPLIT_TIME_PREDICATE_RYA = createRyaUri(COPY_TOOL_SPLIT_TIME_LOCAL_NAME);
- public static RyaURI RTS_TIME_OFFSET_PREDICATE_RYA = createRyaUri(COPY_TOOL_TIME_OFFSET_LOCAL_NAME);
+ public static RyaIRI RTS_SUBJECT_RYA = RdfCloudTripleStoreConstants.RTS_SUBJECT_RYA;
+ public static RyaIRI RTS_COPY_TOOL_RUN_TIME_PREDICATE_RYA = createRyaIri(COPY_TOOL_RUN_TIME_LOCAL_NAME);
+ public static RyaIRI RTS_COPY_TOOL_SPLIT_TIME_PREDICATE_RYA = createRyaIri(COPY_TOOL_SPLIT_TIME_LOCAL_NAME);
+ public static RyaIRI RTS_TIME_OFFSET_PREDICATE_RYA = createRyaIri(COPY_TOOL_TIME_OFFSET_LOCAL_NAME);
/**
* Ignore the meta statements indicating the Rya version and copy time values.
@@ -107,22 +107,22 @@
}
/**
- * Creates a {@link RyaURI} for the specified local name.
- * @param localName the URI's local name.
- * @return the {@link RyraURI}.
+ * Creates a {@link RyaIRI} for the specified local name.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- public static RyaURI createRyaUri(final String localName) {
- return createRyaUri(NAMESPACE, localName);
+ public static RyaIRI createRyaIri(final String localName) {
+ return createRyaIri(NAMESPACE, localName);
}
/**
- * Creates a {@link RyaURI} for the specified local name.
+ * Creates a {@link RyaIRI} for the specified local name.
* @param namespace the namespace.
- * @param localName the URI's local name.
- * @return the {@link RyraURI}.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- public static RyaURI createRyaUri(final String namespace, final String localName) {
- return RdfToRyaConversions.convertURI(VALUE_FACTORY.createIRI(namespace, localName));
+ public static RyaIRI createRyaIri(final String namespace, final String localName) {
+ return RdfToRyaConversions.convertIRI(VALUE_FACTORY.createIRI(namespace, localName));
}
/**
@@ -207,13 +207,13 @@
/**
* Gets the metadata key from the table.
- * @param ryaStatement the {@link RyaStatement} for the metadata key to query.
+ * @param predicateRyaIri the predicate {@link RyaIRI}.
* @param dao the {@link AccumuloRyaDAO}.
* @return the string value of the object from the metadata key.
* @throws RyaDAOException
*/
- private static String getMetadata(final RyaURI predicateRyaUri, final AccumuloRyaDAO dao) throws RyaDAOException {
- final RyaStatement ryaStatement = new RyaStatement(RTS_SUBJECT_RYA, predicateRyaUri, null);
+ private static String getMetadata(final RyaIRI predicateRyaIri, final AccumuloRyaDAO dao) throws RyaDAOException {
+ final RyaStatement ryaStatement = new RyaStatement(RTS_SUBJECT_RYA, predicateRyaIri, null);
return getMetadata(ryaStatement, dao);
}
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java
index a1c731a..24902e0 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/MergeToolTest.java
@@ -212,7 +212,7 @@
// (1 updated row, 1 row left alone because it was unchanged, 1 row outside time range,
// 1 row deleted, 1 new row added, 1 modified visibility, 1 deleted by child, 1 added by child).
// There should be 5 rows in the child instance (4 which will be scanned over from the start time).
- ryaStatementUpdatedByChild.setObject(TestUtils.createRyaUri("football"));
+ ryaStatementUpdatedByChild.setObject(TestUtils.createRyaIri("football"));
ryaStatementUpdatedByChild.setTimestamp(TODAY.getTime());
ryaStatementVisibilityDifferent.setColumnVisibility(CHILD_COLUMN_VISIBILITY.getExpression());
childDao.add(ryaStatementOutOfTimeRange);
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/RulesetCopyIT.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/RulesetCopyIT.java
index 6a6a53c..dae21f9 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/RulesetCopyIT.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/RulesetCopyIT.java
@@ -44,7 +44,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.indexing.accumulo.ConfigUtils;
@@ -121,13 +121,13 @@
QUERY_PREFIXES = sb.toString();
}
- private static RyaURI substitute(final String uri) {
+ private static RyaIRI substitute(final String uri) {
for (final String prefix : prefixes.keySet()) {
if (uri.startsWith(prefix)) {
- return new RyaURI(uri.replace(prefix, prefixes.get(prefix)));
+ return new RyaIRI(uri.replace(prefix, prefixes.get(prefix)));
}
}
- return new RyaURI(uri);
+ return new RyaIRI(uri);
}
private static RyaStatement statement(final String s, final String p, final RyaType o) {
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java
index 6cc59f0..d456335 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/demo/MergeToolDemo.java
@@ -245,11 +245,11 @@
// Change statements that were updated by the parent or child after the start time.
final RyaStatement ryaStatementCase7Updated = TestUtils.copyRyaStatement(ryaStatementCase7);
- ryaStatementCase7Updated.setSubject(TestUtils.createRyaUri("c7 BOB"));
+ ryaStatementCase7Updated.setSubject(TestUtils.createRyaIri("c7 BOB"));
ryaStatementCase7Updated.setTimestamp(TODAY.getTime());
final RyaStatement ryaStatementCase8Updated = TestUtils.copyRyaStatement(ryaStatementCase8);
- ryaStatementCase8Updated.setSubject(TestUtils.createRyaUri("c8 SUSAN"));
+ ryaStatementCase8Updated.setSubject(TestUtils.createRyaIri("c8 SUSAN"));
ryaStatementCase8Updated.setTimestamp(TODAY.getTime());
final RyaStatement ryaStatementVisibilityDifferentUpdated = TestUtils.copyRyaStatement(ryaStatementVisibilityDifferent);
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/driver/MiniAccumuloClusterDriver.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/driver/MiniAccumuloClusterDriver.java
index a42b561..bd61fc8 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/driver/MiniAccumuloClusterDriver.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/driver/MiniAccumuloClusterDriver.java
@@ -111,7 +111,7 @@
// (1 updated row, 1 row left alone because it was unchanged, 1 row outside time range,
// 1 row deleted, 1 new row added, 1 modified visibility, 1 deleted by child, 1 added by child).
// There should be 5 rows in the child instance (4 which will be scanned over from the start time).
- ryaStatementUpdatedByChild.setObject(TestUtils.createRyaUri("football"));
+ ryaStatementUpdatedByChild.setObject(TestUtils.createRyaIri("football"));
ryaStatementUpdatedByChild.setTimestamp(TODAY.getTime());
ryaStatementVisibilityDifferent.setColumnVisibility(CHILD_COLUMN_VISIBILITY.getExpression());
childStatements.add(ryaStatementOutOfTimeRange);
diff --git a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/util/TestUtils.java b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/util/TestUtils.java
index 3b4358b..23e35a2 100644
--- a/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/util/TestUtils.java
+++ b/extras/rya.merger/src/test/java/org/apache/rya/accumulo/mr/merge/util/TestUtils.java
@@ -26,7 +26,7 @@
import org.apache.rya.accumulo.AccumuloRdfConfiguration;
import org.apache.rya.accumulo.AccumuloRyaDAO;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
@@ -210,12 +210,12 @@
}
/**
- * Creates a {@link RyaURI} for the specified local name.
- * @param localName the URI's local name.
- * @return the {@link RyraURI}.
+ * Creates a {@link RyaIRI} for the specified local name.
+ * @param localName the IRI's local name.
+ * @return the {@link RyaIRI}.
*/
- public static RyaURI createRyaUri(final String localName) {
- return AccumuloRyaUtils.createRyaUri(NAMESPACE, localName);
+ public static RyaIRI createRyaIri(final String localName) {
+ return AccumuloRyaUtils.createRyaIri(NAMESPACE, localName);
}
/**
@@ -227,10 +227,10 @@
* @return the {@link RyaStatement}.
*/
public static RyaStatement createRyaStatement(final String subject, final String predicate, final String object, final Date date) {
- final RyaURI subjectUri = createRyaUri(subject);
- final RyaURI predicateUri = createRyaUri(predicate);
- final RyaURI objectUri = createRyaUri(object);
- final RyaStatement ryaStatement = new RyaStatement(subjectUri, predicateUri, objectUri);
+ final RyaIRI subjectIri = createRyaIri(subject);
+ final RyaIRI predicateIri = createRyaIri(predicate);
+ final RyaIRI objectIri = createRyaIri(object);
+ final RyaStatement ryaStatement = new RyaStatement(subjectIri, predicateIri, objectIri);
if (date != null) {
ryaStatement.setTimestamp(date.getTime());
}
diff --git a/extras/rya.pcj.fluo/pcj.fluo.api/src/main/java/org/apache/rya/indexing/pcj/fluo/api/CreateFluoPcj.java b/extras/rya.pcj.fluo/pcj.fluo.api/src/main/java/org/apache/rya/indexing/pcj/fluo/api/CreateFluoPcj.java
index 731952a..220b7fa 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.api/src/main/java/org/apache/rya/indexing/pcj/fluo/api/CreateFluoPcj.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.api/src/main/java/org/apache/rya/indexing/pcj/fluo/api/CreateFluoPcj.java
@@ -41,7 +41,7 @@
import org.apache.rya.api.client.CreatePCJ.QueryType;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.BatchRyaQuery;
import org.apache.rya.api.resolver.RdfToRyaConversions;
@@ -418,29 +418,29 @@
final Value predVal = sp.getPredicateVar().getValue();
final Value objVal = sp.getObjectVar().getValue();
- RyaURI subjURI = null;
- RyaURI predURI = null;
+ RyaIRI subjIRI = null;
+ RyaIRI predIRI = null;
RyaType objType = null;
if(subjVal != null) {
if(!(subjVal instanceof Resource)) {
throw new AssertionError("Subject must be a Resource.");
}
- subjURI = RdfToRyaConversions.convertResource((Resource) subjVal);
+ subjIRI = RdfToRyaConversions.convertResource((Resource) subjVal);
}
if (predVal != null) {
if(!(predVal instanceof IRI)) {
- throw new AssertionError("Predicate must be a URI.");
+ throw new AssertionError("Predicate must be a IRI.");
}
- predURI = RdfToRyaConversions.convertURI((IRI) predVal);
+ predIRI = RdfToRyaConversions.convertIRI((IRI) predVal);
}
if (objVal != null ) {
objType = RdfToRyaConversions.convertValue(objVal);
}
- return new RyaStatement(subjURI, predURI, objType);
+ return new RyaStatement(subjIRI, predIRI, objType);
}
private String[] getAuths(final Connector accumulo) {
diff --git a/extras/rya.pcj.fluo/pcj.fluo.app/src/main/java/org/apache/rya/indexing/pcj/fluo/app/ConstructProjection.java b/extras/rya.pcj.fluo/pcj.fluo.app/src/main/java/org/apache/rya/indexing/pcj/fluo/app/ConstructProjection.java
index fbf95fc..8196955 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.app/src/main/java/org/apache/rya/indexing/pcj/fluo/app/ConstructProjection.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.app/src/main/java/org/apache/rya/indexing/pcj/fluo/app/ConstructProjection.java
@@ -27,7 +27,7 @@
import org.apache.log4j.Logger;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.VarNameUtils;
import org.apache.rya.api.model.VisibilityBindingSet;
import org.apache.rya.api.resolver.RdfToRyaConversions;
@@ -205,8 +205,8 @@
Preconditions.checkArgument(subj instanceof Resource);
Preconditions.checkArgument(pred instanceof IRI);
- RyaURI subjType = RdfToRyaConversions.convertResource((Resource) subj);
- RyaURI predType = RdfToRyaConversions.convertURI((IRI) pred);
+ RyaIRI subjType = RdfToRyaConversions.convertResource((Resource) subj);
+ RyaIRI predType = RdfToRyaConversions.convertIRI((IRI) pred);
RyaType objectType = RdfToRyaConversions.convertValue(obj);
RyaStatement statement = new RyaStatement(subjType, predType, objectType);
diff --git a/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructGraphTest.java b/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructGraphTest.java
index c52a72a..e70993a 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructGraphTest.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructGraphTest.java
@@ -27,7 +27,7 @@
import java.util.Set;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.model.VisibilityBindingSet;
import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
@@ -61,8 +61,8 @@
VisibilityBindingSet vBs = new VisibilityBindingSet(bs,"FOUO");
Set<RyaStatement> statements = graph.createGraphFromBindingSet(vBs);
- RyaStatement statement1 = new RyaStatement(new RyaURI("uri:Joe"), new RyaURI("uri:talksTo"), new RyaURI("uri:Bob"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("uri:Bob"), new RyaURI("uri:worksAt"), new RyaURI("uri:BurgerShack"));
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("uri:Joe"), new RyaIRI("uri:talksTo"), new RyaIRI("uri:Bob"));
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("uri:Bob"), new RyaIRI("uri:worksAt"), new RyaIRI("uri:BurgerShack"));
Set<RyaStatement> expected = Sets.newHashSet(Arrays.asList(statement1, statement2));
expected.forEach(x-> x.setColumnVisibility("FOUO".getBytes()));
ConstructGraphTestUtils.ryaStatementSetsEqualIgnoresTimestamp(expected, statements);
@@ -84,18 +84,18 @@
Set<RyaStatement> statements = graph.createGraphFromBindingSet(vBs);
Set<RyaStatement> statements2 = graph.createGraphFromBindingSet(vBs);
- RyaURI subject = null;
+ RyaIRI subject = null;
for(RyaStatement statement: statements) {
- RyaURI subjURI = statement.getSubject();
+ RyaIRI subjURI = statement.getSubject();
if(subject == null) {
subject = subjURI;
} else {
assertEquals(subjURI, subject);
}
}
- RyaURI subject2 = null;
+ RyaIRI subject2 = null;
for(RyaStatement statement: statements2) {
- RyaURI subjURI = statement.getSubject();
+ RyaIRI subjURI = statement.getSubject();
if(subject2 == null) {
subject2 = subjURI;
} else {
diff --git a/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructGraphTestUtils.java b/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructGraphTestUtils.java
index d505b33..ac21cdf 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructGraphTestUtils.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructGraphTestUtils.java
@@ -25,7 +25,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaSubGraph;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.eclipse.rdf4j.model.Statement;
import org.junit.Assert;
@@ -61,7 +61,7 @@
}
public static void ryaStatementsEqualIgnoresBlankNode(Set<RyaStatement> statements1, Set<RyaStatement> statements2) {
- Map<String, RyaURI> bNodeMap = new HashMap<>();
+ Map<String, RyaIRI> bNodeMap = new HashMap<>();
statements1.forEach(x-> bNodeMap.put(x.getPredicate().getData(), x.getSubject()));
statements2.forEach(x -> x.setSubject(bNodeMap.get(x.getPredicate().getData())));
ryaStatementSetsEqualIgnoresTimestamp(statements1, statements2);
diff --git a/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructProjectionTest.java b/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructProjectionTest.java
index f884b7b..a541575 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructProjectionTest.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/ConstructProjectionTest.java
@@ -27,7 +27,7 @@
import java.util.Map;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.VarNameUtils;
import org.apache.rya.api.model.VisibilityBindingSet;
import org.apache.rya.api.resolver.RdfToRyaConversions;
@@ -60,7 +60,7 @@
VisibilityBindingSet vBs = new VisibilityBindingSet(bs, "FOUO");
RyaStatement statement = projection.projectBindingSet(vBs, new HashMap<>());
- RyaStatement expected = new RyaStatement(new RyaURI("uri:Joe"), new RyaURI("uri:talksTo"), new RyaURI("uri:Bob"));
+ RyaStatement expected = new RyaStatement(new RyaIRI("uri:Joe"), new RyaIRI("uri:talksTo"), new RyaIRI("uri:Bob"));
expected.setColumnVisibility("FOUO".getBytes("UTF-8"));
expected.setTimestamp(statement.getTimestamp());
@@ -81,7 +81,7 @@
VisibilityBindingSet vBs = new VisibilityBindingSet(bs);
RyaStatement statement = projection.projectBindingSet(vBs, new HashMap<>());
- RyaStatement expected = new RyaStatement(new RyaURI("uri:Joe"), new RyaURI("uri:worksWith"), new RyaURI("uri:Bob"));
+ RyaStatement expected = new RyaStatement(new RyaIRI("uri:Joe"), new RyaIRI("uri:worksWith"), new RyaIRI("uri:Bob"));
expected.setTimestamp(statement.getTimestamp());
expected.setColumnVisibility(new byte[0]);
@@ -105,7 +105,7 @@
bNodeMap.put(VarNameUtils.prependAnonymous("1"), bNode);
RyaStatement statement = projection.projectBindingSet(vBs,bNodeMap);
- RyaStatement expected = new RyaStatement(RdfToRyaConversions.convertResource(bNode), new RyaURI("uri:talksTo"), new RyaURI("uri:Bob"));
+ RyaStatement expected = new RyaStatement(RdfToRyaConversions.convertResource(bNode), new RyaIRI("uri:talksTo"), new RyaIRI("uri:Bob"));
expected.setTimestamp(statement.getTimestamp());
expected.setColumnVisibility(new byte[0]);
diff --git a/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/RyaSubGraphKafkaSerDeTest.java b/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/RyaSubGraphKafkaSerDeTest.java
index 9a9feef..d19883b 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/RyaSubGraphKafkaSerDeTest.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.app/src/test/java/org/apache/rya/indexing/pcj/fluo/app/RyaSubGraphKafkaSerDeTest.java
@@ -25,7 +25,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaSubGraph;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.pcj.fluo.app.export.kafka.RyaSubGraphKafkaSerDe;
import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
import org.junit.Test;
@@ -37,8 +37,8 @@
@Test
public void serializationTestWithURI() {
RyaSubGraph bundle = new RyaSubGraph(UUID.randomUUID().toString());
- bundle.addStatement(new RyaStatement(new RyaURI("uri:123"), new RyaURI("uri:234"), new RyaURI("uri:345")));
- bundle.addStatement(new RyaStatement(new RyaURI("uri:345"), new RyaURI("uri:567"), new RyaURI("uri:789")));
+ bundle.addStatement(new RyaStatement(new RyaIRI("uri:123"), new RyaIRI("uri:234"), new RyaIRI("uri:345")));
+ bundle.addStatement(new RyaStatement(new RyaIRI("uri:345"), new RyaIRI("uri:567"), new RyaIRI("uri:789")));
byte[] bundleBytes = serializer.toBytes(bundle);
RyaSubGraph deserializedBundle = serializer.fromBytes(bundleBytes);
assertEquals(bundle, deserializedBundle);
@@ -48,8 +48,8 @@
@Test
public void serializationTestWithLiteral() {
RyaSubGraph bundle = new RyaSubGraph(UUID.randomUUID().toString());
- bundle.addStatement(new RyaStatement(new RyaURI("uri:123"), new RyaURI("uri:234"), new RyaType(XMLSchema.INTEGER, "345")));
- bundle.addStatement(new RyaStatement(new RyaURI("uri:345"), new RyaURI("uri:567"), new RyaType(XMLSchema.INTEGER, "789")));
+ bundle.addStatement(new RyaStatement(new RyaIRI("uri:123"), new RyaIRI("uri:234"), new RyaType(XMLSchema.INTEGER, "345")));
+ bundle.addStatement(new RyaStatement(new RyaIRI("uri:345"), new RyaIRI("uri:567"), new RyaType(XMLSchema.INTEGER, "789")));
byte[] bundleBytes = serializer.toBytes(bundle);
RyaSubGraph deserializedBundle = serializer.fromBytes(bundleBytes);
assertEquals(bundle, deserializedBundle);
diff --git a/extras/rya.pcj.fluo/pcj.fluo.demo/src/main/java/org/apache/rya/indexing/pcj/fluo/demo/FluoAndHistoricPcjsDemo.java b/extras/rya.pcj.fluo/pcj.fluo.demo/src/main/java/org/apache/rya/indexing/pcj/fluo/demo/FluoAndHistoricPcjsDemo.java
index 8ef6db3..b12dc9e 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.demo/src/main/java/org/apache/rya/indexing/pcj/fluo/demo/FluoAndHistoricPcjsDemo.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.demo/src/main/java/org/apache/rya/indexing/pcj/fluo/demo/FluoAndHistoricPcjsDemo.java
@@ -30,7 +30,7 @@
import org.apache.log4j.Logger;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.api.utils.CloseableIterator;
@@ -61,38 +61,38 @@
private static final Logger log = Logger.getLogger(FluoAndHistoricPcjsDemo.class);
// Employees
- private static final RyaURI alice = new RyaURI("http://Alice");
- private static final RyaURI bob = new RyaURI("http://Bob");
- private static final RyaURI charlie = new RyaURI("http://Charlie");
- private static final RyaURI frank = new RyaURI("http://Frank");
+ private static final RyaIRI alice = new RyaIRI("http://Alice");
+ private static final RyaIRI bob = new RyaIRI("http://Bob");
+ private static final RyaIRI charlie = new RyaIRI("http://Charlie");
+ private static final RyaIRI frank = new RyaIRI("http://Frank");
// Patrons
- private static final RyaURI david = new RyaURI("http://David");
- private static final RyaURI eve = new RyaURI("http://Eve");
- private static final RyaURI george = new RyaURI("http://George");
+ private static final RyaIRI david = new RyaIRI("http://David");
+ private static final RyaIRI eve = new RyaIRI("http://Eve");
+ private static final RyaIRI george = new RyaIRI("http://George");
// Other People
- private static final RyaURI henry = new RyaURI("http://Henry");
- private static final RyaURI irene = new RyaURI("http://Irene");
- private static final RyaURI justin = new RyaURI("http://Justin");
- private static final RyaURI kristi = new RyaURI("http://Kristi");
- private static final RyaURI luke = new RyaURI("http://Luke");
- private static final RyaURI manny = new RyaURI("http://Manny");
- private static final RyaURI nate = new RyaURI("http://Nate");
- private static final RyaURI olivia = new RyaURI("http://Olivia");
- private static final RyaURI paul = new RyaURI("http://Paul");
- private static final RyaURI ross = new RyaURI("http://Ross");
- private static final RyaURI sally = new RyaURI("http://Sally");
- private static final RyaURI tim = new RyaURI("http://Tim");
+ private static final RyaIRI henry = new RyaIRI("http://Henry");
+ private static final RyaIRI irene = new RyaIRI("http://Irene");
+ private static final RyaIRI justin = new RyaIRI("http://Justin");
+ private static final RyaIRI kristi = new RyaIRI("http://Kristi");
+ private static final RyaIRI luke = new RyaIRI("http://Luke");
+ private static final RyaIRI manny = new RyaIRI("http://Manny");
+ private static final RyaIRI nate = new RyaIRI("http://Nate");
+ private static final RyaIRI olivia = new RyaIRI("http://Olivia");
+ private static final RyaIRI paul = new RyaIRI("http://Paul");
+ private static final RyaIRI ross = new RyaIRI("http://Ross");
+ private static final RyaIRI sally = new RyaIRI("http://Sally");
+ private static final RyaIRI tim = new RyaIRI("http://Tim");
// Places
- private static final RyaURI coffeeShop = new RyaURI("http://CoffeeShop");
- private static final RyaURI burgerShop = new RyaURI("http://BurgerShop");
- private static final RyaURI cupcakeShop= new RyaURI("http://cupcakeShop");
+ private static final RyaIRI coffeeShop = new RyaIRI("http://CoffeeShop");
+ private static final RyaIRI burgerShop = new RyaIRI("http://BurgerShop");
+ private static final RyaIRI cupcakeShop= new RyaIRI("http://cupcakeShop");
// Verbs
- private static final RyaURI talksTo = new RyaURI("http://talksTo");
- private static final RyaURI worksAt = new RyaURI("http://worksAt");
+ private static final RyaIRI talksTo = new RyaIRI("http://talksTo");
+ private static final RyaIRI worksAt = new RyaIRI("http://worksAt");
/**
* Used to pause the demo waiting for the presenter to hit the Enter key.
@@ -292,8 +292,8 @@
}
private static String prettyFormat(final RyaStatement statement) {
- final RyaURI s = statement.getSubject();
- final RyaURI p = statement.getPredicate();
+ final RyaIRI s = statement.getSubject();
+ final RyaIRI p = statement.getPredicate();
final RyaType o = statement.getObject();
return "<" + s.getData() + "> <"+ p.getData() + "> <" + o.getData() + ">";
}
diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ConstructGraphTestUtils.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ConstructGraphTestUtils.java
index ca00934..0f15a5d 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ConstructGraphTestUtils.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ConstructGraphTestUtils.java
@@ -25,7 +25,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaSubGraph;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.eclipse.rdf4j.model.Statement;
import org.junit.Assert;
@@ -72,7 +72,7 @@
}
public static void ryaStatementsEqualIgnoresBlankNode(Set<RyaStatement> statements1, Set<RyaStatement> statements2) {
- Map<String, RyaURI> bNodeMap = new HashMap<>();
+ Map<String, RyaIRI> bNodeMap = new HashMap<>();
statements1.forEach(x-> bNodeMap.put(x.getPredicate().getData(), x.getSubject()));
statements2.forEach(x -> x.setSubject(bNodeMap.get(x.getPredicate().getData())));
ryaStatementSetsEqualIgnoresTimestamp(statements1, statements2);
diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/api/CountStatementsIT.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/api/CountStatementsIT.java
index cb34d06..6ca87e5 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/api/CountStatementsIT.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/api/CountStatementsIT.java
@@ -28,7 +28,7 @@
import org.apache.fluo.api.client.FluoFactory;
import org.apache.fluo.api.config.ObserverSpecification;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.pcj.fluo.test.base.RyaExportITBase;
import org.junit.Test;
@@ -56,11 +56,11 @@
public void countStatements() {
// Insert some Triples into the Fluo app.
final List<RyaStatement> triples = new ArrayList<>();
- triples.add( RyaStatement.builder().setSubject(new RyaURI("http://Alice")).setPredicate(new RyaURI("http://talksTo")).setObject(new RyaURI("http://Bob")).build() );
- triples.add( RyaStatement.builder().setSubject(new RyaURI("http://Bob")).setPredicate(new RyaURI("http://talksTo")).setObject(new RyaURI("http://Alice")).build() );
- triples.add( RyaStatement.builder().setSubject(new RyaURI("http://Charlie")).setPredicate(new RyaURI("http://talksTo")).setObject(new RyaURI("http://Bob")).build() );
- triples.add( RyaStatement.builder().setSubject(new RyaURI("http://David")).setPredicate(new RyaURI("http://talksTo")).setObject(new RyaURI("http://Bob")).build() );
- triples.add( RyaStatement.builder().setSubject(new RyaURI("http://Eve")).setPredicate(new RyaURI("http://talksTo")).setObject(new RyaURI("http://Bob")).build() );
+ triples.add( RyaStatement.builder().setSubject(new RyaIRI("http://Alice")).setPredicate(new RyaIRI("http://talksTo")).setObject(new RyaIRI("http://Bob")).build() );
+ triples.add( RyaStatement.builder().setSubject(new RyaIRI("http://Bob")).setPredicate(new RyaIRI("http://talksTo")).setObject(new RyaIRI("http://Alice")).build() );
+ triples.add( RyaStatement.builder().setSubject(new RyaIRI("http://Charlie")).setPredicate(new RyaIRI("http://talksTo")).setObject(new RyaIRI("http://Bob")).build() );
+ triples.add( RyaStatement.builder().setSubject(new RyaIRI("http://David")).setPredicate(new RyaIRI("http://talksTo")).setObject(new RyaIRI("http://Bob")).build() );
+ triples.add( RyaStatement.builder().setSubject(new RyaIRI("http://Eve")).setPredicate(new RyaIRI("http://talksTo")).setObject(new RyaIRI("http://Bob")).build() );
try(FluoClient fluoClient = FluoFactory.newClient(super.getFluoConfiguration())) {
new InsertTriples().insert(fluoClient, triples, Optional.<String>absent());
diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/api/GetQueryReportIT.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/api/GetQueryReportIT.java
index c0f0f16..9b82fe6 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/api/GetQueryReportIT.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/api/GetQueryReportIT.java
@@ -30,7 +30,7 @@
import org.apache.fluo.api.client.FluoClient;
import org.apache.fluo.api.client.FluoFactory;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.pcj.fluo.api.GetQueryReport.QueryReport;
import org.apache.rya.indexing.pcj.fluo.app.query.FluoQuery;
import org.apache.rya.indexing.pcj.fluo.app.query.StatementPatternMetadata;
@@ -60,22 +60,22 @@
// Triples that will be streamed into Fluo after the PCJ has been created.
final Set<RyaStatement> streamedTriples = Sets.newHashSet(
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://worksAt"), new RyaURI("http://Taco Shop")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://worksAt"), new RyaURI("http://Burger Join")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://worksAt"), new RyaURI("http://Pastery Shop")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://worksAt"), new RyaURI("http://Burrito Place")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://livesIn"), new RyaURI("http://Lost County")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://livesIn"), new RyaURI("http://Big City")),
- new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://worksAt"), new RyaURI("http://Burrito Place")),
- new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://livesIn"), new RyaURI("http://Big City")),
- new RyaStatement(new RyaURI("http://Charlie"), new RyaURI("http://worksAt"), new RyaURI("http://Burrito Place")),
- new RyaStatement(new RyaURI("http://Charlie"), new RyaURI("http://livesIn"), new RyaURI("http://Big City")),
- new RyaStatement(new RyaURI("http://David"), new RyaURI("http://worksAt"), new RyaURI("http://Burrito Place")),
- new RyaStatement(new RyaURI("http://David"), new RyaURI("http://livesIn"), new RyaURI("http://Lost County")),
- new RyaStatement(new RyaURI("http://Eve"), new RyaURI("http://worksAt"), new RyaURI("http://Burrito Place")),
- new RyaStatement(new RyaURI("http://Eve"), new RyaURI("http://livesIn"), new RyaURI("http://Big City")),
- new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://worksAt"), new RyaURI("http://Burrito Place")),
- new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://livesIn"), new RyaURI("http://Lost County")));
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://worksAt"), new RyaIRI("http://Taco Shop")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://worksAt"), new RyaIRI("http://Burger Join")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://worksAt"), new RyaIRI("http://Pastery Shop")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://worksAt"), new RyaIRI("http://Burrito Place")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://livesIn"), new RyaIRI("http://Lost County")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://livesIn"), new RyaIRI("http://Big City")),
+ new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://worksAt"), new RyaIRI("http://Burrito Place")),
+ new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://livesIn"), new RyaIRI("http://Big City")),
+ new RyaStatement(new RyaIRI("http://Charlie"), new RyaIRI("http://worksAt"), new RyaIRI("http://Burrito Place")),
+ new RyaStatement(new RyaIRI("http://Charlie"), new RyaIRI("http://livesIn"), new RyaIRI("http://Big City")),
+ new RyaStatement(new RyaIRI("http://David"), new RyaIRI("http://worksAt"), new RyaIRI("http://Burrito Place")),
+ new RyaStatement(new RyaIRI("http://David"), new RyaIRI("http://livesIn"), new RyaIRI("http://Lost County")),
+ new RyaStatement(new RyaIRI("http://Eve"), new RyaIRI("http://worksAt"), new RyaIRI("http://Burrito Place")),
+ new RyaStatement(new RyaIRI("http://Eve"), new RyaIRI("http://livesIn"), new RyaIRI("http://Big City")),
+ new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://worksAt"), new RyaIRI("http://Burrito Place")),
+ new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://livesIn"), new RyaIRI("http://Lost County")));
// Create the PCJ table.
diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/BatchIT.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/BatchIT.java
index 8ebc9fc..63c7bbe 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/BatchIT.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/BatchIT.java
@@ -38,7 +38,7 @@
import org.apache.fluo.core.client.FluoClientImpl;
import org.apache.log4j.Logger;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.function.join.LazyJoiningIterator.Side;
import org.apache.rya.api.model.VisibilityBindingSet;
import org.apache.rya.indexing.pcj.fluo.api.CreateFluoPcj;
@@ -82,9 +82,9 @@
+ " <urn:predicate_2> ?object2 } ";
try (FluoClient fluoClient = new FluoClientImpl(getFluoConfiguration())) {
- RyaURI subj = new RyaURI("urn:subject_1");
- RyaStatement statement1 = new RyaStatement(subj, new RyaURI("urn:predicate_1"), null);
- RyaStatement statement2 = new RyaStatement(subj, new RyaURI("urn:predicate_2"), null);
+ RyaIRI subj = new RyaIRI("urn:subject_1");
+ RyaStatement statement1 = new RyaStatement(subj, new RyaIRI("urn:predicate_1"), null);
+ RyaStatement statement2 = new RyaStatement(subj, new RyaIRI("urn:predicate_2"), null);
Set<RyaStatement> statements1 = getRyaStatements(statement1, 10);
Set<RyaStatement> statements2 = getRyaStatements(statement2, 10);
@@ -122,9 +122,9 @@
+ " <urn:predicate_2> ?object2 } ";
try (FluoClient fluoClient = new FluoClientImpl(getFluoConfiguration())) {
- RyaURI subj = new RyaURI("urn:subject_1");
- RyaStatement statement1 = new RyaStatement(subj, new RyaURI("urn:predicate_1"), null);
- RyaStatement statement2 = new RyaStatement(subj, new RyaURI("urn:predicate_2"), null);
+ RyaIRI subj = new RyaIRI("urn:subject_1");
+ RyaStatement statement1 = new RyaStatement(subj, new RyaIRI("urn:predicate_1"), null);
+ RyaStatement statement2 = new RyaStatement(subj, new RyaIRI("urn:predicate_2"), null);
Set<RyaStatement> statements1 = getRyaStatements(statement1, 5);
Set<RyaStatement> statements2 = getRyaStatements(statement2, 5);
@@ -174,8 +174,8 @@
+ " <urn:predicate_2> ?object2 } ";
try (FluoClient fluoClient = new FluoClientImpl(getFluoConfiguration())) {
- RyaURI subj = new RyaURI("urn:subject_1");
- RyaStatement statement2 = new RyaStatement(subj, new RyaURI("urn:predicate_2"), null);
+ RyaIRI subj = new RyaIRI("urn:subject_1");
+ RyaStatement statement2 = new RyaStatement(subj, new RyaIRI("urn:predicate_2"), null);
Set<RyaStatement> statements2 = getRyaStatements(statement2, 5);
// Create the PCJ table.
@@ -222,9 +222,9 @@
+ " <urn:predicate_2> ?object2 } ";
try (FluoClient fluoClient = new FluoClientImpl(getFluoConfiguration())) {
- RyaURI subj = new RyaURI("urn:subject_1");
- RyaStatement statement1 = new RyaStatement(subj, new RyaURI("urn:predicate_1"), null);
- RyaStatement statement2 = new RyaStatement(subj, new RyaURI("urn:predicate_2"), null);
+ RyaIRI subj = new RyaIRI("urn:subject_1");
+ RyaStatement statement1 = new RyaStatement(subj, new RyaIRI("urn:predicate_1"), null);
+ RyaStatement statement2 = new RyaStatement(subj, new RyaIRI("urn:predicate_2"), null);
Set<RyaStatement> statements1 = getRyaStatements(statement1, 15);
Set<RyaStatement> statements2 = getRyaStatements(statement2, 15);
@@ -256,12 +256,12 @@
+ "OPTIONAL{ ?subject <urn:predicate_2> ?object2} } ";
try (FluoClient fluoClient = new FluoClientImpl(getFluoConfiguration())) {
- RyaURI subj = new RyaURI("urn:subject_1");
- RyaStatement statement1 = new RyaStatement(subj, new RyaURI("urn:predicate_1"), null);
- RyaStatement statement2 = new RyaStatement(subj, new RyaURI("urn:predicate_2"), null);
+ RyaIRI subj = new RyaIRI("urn:subject_1");
+ RyaStatement statement1 = new RyaStatement(subj, new RyaIRI("urn:predicate_1"), null);
+ RyaStatement statement2 = new RyaStatement(subj, new RyaIRI("urn:predicate_2"), null);
- subj = new RyaURI("urn:subject_2");
- RyaStatement statement3 = new RyaStatement(subj, new RyaURI("urn:predicate_1"), null);
+ subj = new RyaIRI("urn:subject_2");
+ RyaStatement statement3 = new RyaStatement(subj, new RyaIRI("urn:predicate_1"), null);
Set<RyaStatement> statements1 = getRyaStatements(statement1, 10);
Set<RyaStatement> statements2 = getRyaStatements(statement2, 10);
@@ -295,15 +295,15 @@
+ " <urn:predicate_2> ?object2 ." + " ?subject2 <urn:predicate_3> ?object2 } ";
try (FluoClient fluoClient = new FluoClientImpl(getFluoConfiguration())) {
- RyaURI subj1 = new RyaURI("urn:subject_1");
- RyaStatement statement1 = new RyaStatement(subj1, new RyaURI("urn:predicate_1"), null);
- RyaStatement statement2 = new RyaStatement(subj1, new RyaURI("urn:predicate_2"), null);
+ RyaIRI subj1 = new RyaIRI("urn:subject_1");
+ RyaStatement statement1 = new RyaStatement(subj1, new RyaIRI("urn:predicate_1"), null);
+ RyaStatement statement2 = new RyaStatement(subj1, new RyaIRI("urn:predicate_2"), null);
Set<RyaStatement> statements1 = getRyaStatements(statement1, 10);
Set<RyaStatement> statements2 = getRyaStatements(statement2, 10);
- RyaURI subj2 = new RyaURI("urn:subject_2");
- RyaStatement statement3 = new RyaStatement(subj2, new RyaURI("urn:predicate_3"), null);
+ RyaIRI subj2 = new RyaIRI("urn:subject_2");
+ RyaStatement statement3 = new RyaStatement(subj2, new RyaIRI("urn:predicate_3"), null);
Set<RyaStatement> statements3 = getRyaStatements(statement3, 10);
// Create the PCJ table.
@@ -338,13 +338,13 @@
for (int i = 0; i < numTriples; i++) {
RyaStatement stmnt = new RyaStatement(statement.getSubject(), statement.getPredicate(), statement.getObject());
if (stmnt.getSubject() == null) {
- stmnt.setSubject(new RyaURI(subject + i));
+ stmnt.setSubject(new RyaIRI(subject + i));
}
if (stmnt.getPredicate() == null) {
- stmnt.setPredicate(new RyaURI(predicate + i));
+ stmnt.setPredicate(new RyaIRI(predicate + i));
}
if (stmnt.getObject() == null) {
- stmnt.setObject(new RyaURI(object + i));
+ stmnt.setObject(new RyaIRI(object + i));
}
statements.add(stmnt);
}
diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/InputIT.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/InputIT.java
index ff2dc28..56fc7df 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/InputIT.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/InputIT.java
@@ -28,7 +28,7 @@
import org.apache.fluo.api.client.FluoClient;
import org.apache.fluo.api.client.FluoFactory;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.utils.CloseableIterator;
import org.apache.rya.indexing.pcj.fluo.api.CreateFluoPcj;
import org.apache.rya.indexing.pcj.fluo.api.InsertTriples;
@@ -132,16 +132,16 @@
// Triples that will be streamed into Fluo after the PCJ has been created.
final Set<RyaStatement> streamedTriples = Sets.newHashSet(
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"), new RyaURI("http://Eve")),
- new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://talksTo"), new RyaURI("http://Eve")),
- new RyaStatement(new RyaURI("http://Charlie"), new RyaURI("http://talksTo"), new RyaURI("http://Eve")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"), new RyaIRI("http://Eve")),
+ new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://talksTo"), new RyaIRI("http://Eve")),
+ new RyaStatement(new RyaIRI("http://Charlie"), new RyaIRI("http://talksTo"), new RyaIRI("http://Eve")),
- new RyaStatement(new RyaURI("http://Eve"), new RyaURI("http://helps"), new RyaURI("http://Kevin")),
+ new RyaStatement(new RyaIRI("http://Eve"), new RyaIRI("http://helps"), new RyaIRI("http://Kevin")),
- new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")),
- new RyaStatement(new RyaURI("http://Charlie"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")),
- new RyaStatement(new RyaURI("http://Eve"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")),
- new RyaStatement(new RyaURI("http://David"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")));
+ new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")),
+ new RyaStatement(new RyaIRI("http://Charlie"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")),
+ new RyaStatement(new RyaIRI("http://Eve"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")),
+ new RyaStatement(new RyaIRI("http://David"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")));
// The expected results of the SPARQL query once the PCJ has been computed.
final ValueFactory vf = SimpleValueFactory.getInstance();
@@ -211,8 +211,8 @@
// Triples that will be streamed into Fluo after the PCJ has been created.
final Set<RyaStatement> streamedTriples = Sets.newHashSet(
- new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://talksTo"), new RyaURI("http://Eve")),
- new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")));
+ new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://talksTo"), new RyaIRI("http://Eve")),
+ new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")));
// Load the historic data into Rya.
final SailRepositoryConnection ryaConn = super.getRyaSailRepository().getConnection();
@@ -293,8 +293,8 @@
// Triples that will be streamed into Fluo after the PCJ has been created.
final Set<RyaStatement> streamedTriples = Sets.newHashSet(
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"), new RyaURI("http://Eve")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")));
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"), new RyaIRI("http://Eve")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")));
// The expected final result.
final Set<BindingSet> expected = new HashSet<>();
diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/KafkaRyaSubGraphExportIT.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/KafkaRyaSubGraphExportIT.java
index 309d1ca..990a69c 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/KafkaRyaSubGraphExportIT.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/KafkaRyaSubGraphExportIT.java
@@ -43,7 +43,7 @@
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaSubGraph;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.indexing.pcj.fluo.ConstructGraphTestUtils;
import org.apache.rya.indexing.pcj.fluo.api.CreateFluoPcj;
@@ -128,8 +128,8 @@
final Set<RyaSubGraph> expectedResults = new HashSet<>();
RyaSubGraph subGraph = new RyaSubGraph(pcjId);
- RyaStatement statement1 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:travelsTo"), new RyaURI("urn:London"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:friendsWith"), new RyaURI("urn:Bob"));
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:travelsTo"), new RyaIRI("urn:London"));
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:friendsWith"), new RyaIRI("urn:Bob"));
// if no visibility indicated, then visibilities set to empty byte in
// Fluo - they are null by default in RyaStatement
// need to set visibility to empty byte so that RyaStatement's equals
@@ -151,9 +151,9 @@
+ "?customer <urn:talksTo> ?worker. " + "?worker <urn:livesIn> ?city. " + "?worker <urn:worksAt> <urn:burgerShack>. " + "}";
// Create the Statements that will be loaded into Rya.
- RyaStatement statement1 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:talksTo"), new RyaURI("urn:Bob"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("urn:Bob"), new RyaURI("urn:livesIn"), new RyaURI("urn:London"));
- RyaStatement statement3 = new RyaStatement(new RyaURI("urn:Bob"), new RyaURI("urn:worksAt"), new RyaURI("urn:burgerShack"));
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:talksTo"), new RyaIRI("urn:Bob"));
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("urn:Bob"), new RyaIRI("urn:livesIn"), new RyaIRI("urn:London"));
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("urn:Bob"), new RyaIRI("urn:worksAt"), new RyaIRI("urn:burgerShack"));
statement1.setColumnVisibility("U&W".getBytes("UTF-8"));
statement2.setColumnVisibility("V".getBytes("UTF-8"));
statement3.setColumnVisibility("W".getBytes("UTF-8"));
@@ -167,8 +167,8 @@
// computed.
final Set<RyaSubGraph> expectedResults = new HashSet<>();
RyaSubGraph subGraph = new RyaSubGraph(pcjId);
- RyaStatement statement4 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:travelsTo"), new RyaURI("urn:London"));
- RyaStatement statement5 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:friendsWith"), new RyaURI("urn:Bob"));
+ RyaStatement statement4 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:travelsTo"), new RyaIRI("urn:London"));
+ RyaStatement statement5 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:friendsWith"), new RyaIRI("urn:Bob"));
// if no visibility indicated, then visibilities set to empty byte in
// Fluo - they are null by default in RyaStatement
// need to set visibility to empty byte so that RyaStatement's equals
@@ -191,12 +191,12 @@
+ "?customer <urn:talksTo> ?worker. " + "?worker <urn:livesIn> ?city. " + "?worker <urn:worksAt> <urn:burgerShack>. " + "}";
// Create the Statements that will be loaded into Rya.
- RyaStatement statement1 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:talksTo"), new RyaURI("urn:Bob"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("urn:Bob"), new RyaURI("urn:livesIn"), new RyaURI("urn:London"));
- RyaStatement statement3 = new RyaStatement(new RyaURI("urn:Bob"), new RyaURI("urn:worksAt"), new RyaURI("urn:burgerShack"));
- RyaStatement statement4 = new RyaStatement(new RyaURI("urn:John"), new RyaURI("urn:talksTo"), new RyaURI("urn:Evan"));
- RyaStatement statement5 = new RyaStatement(new RyaURI("urn:Evan"), new RyaURI("urn:livesIn"), new RyaURI("urn:SanFrancisco"));
- RyaStatement statement6 = new RyaStatement(new RyaURI("urn:Evan"), new RyaURI("urn:worksAt"), new RyaURI("urn:burgerShack"));
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:talksTo"), new RyaIRI("urn:Bob"));
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("urn:Bob"), new RyaIRI("urn:livesIn"), new RyaIRI("urn:London"));
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("urn:Bob"), new RyaIRI("urn:worksAt"), new RyaIRI("urn:burgerShack"));
+ RyaStatement statement4 = new RyaStatement(new RyaIRI("urn:John"), new RyaIRI("urn:talksTo"), new RyaIRI("urn:Evan"));
+ RyaStatement statement5 = new RyaStatement(new RyaIRI("urn:Evan"), new RyaIRI("urn:livesIn"), new RyaIRI("urn:SanFrancisco"));
+ RyaStatement statement6 = new RyaStatement(new RyaIRI("urn:Evan"), new RyaIRI("urn:worksAt"), new RyaIRI("urn:burgerShack"));
statement1.setColumnVisibility("U&W".getBytes("UTF-8"));
statement2.setColumnVisibility("V".getBytes("UTF-8"));
statement3.setColumnVisibility("W".getBytes("UTF-8"));
@@ -211,10 +211,10 @@
final Set<RyaSubGraph> results = readAllResults(pcjId);
// Create the expected results of the SPARQL query once the PCJ has been
// computed.
- RyaStatement statement7 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:travelsTo"), new RyaURI("urn:London"));
- RyaStatement statement8 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:friendsWith"), new RyaURI("urn:Bob"));
- RyaStatement statement9 = new RyaStatement(new RyaURI("urn:John"), new RyaURI("urn:travelsTo"), new RyaURI("urn:SanFrancisco"));
- RyaStatement statement10 = new RyaStatement(new RyaURI("urn:John"), new RyaURI("urn:friendsWith"), new RyaURI("urn:Evan"));
+ RyaStatement statement7 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:travelsTo"), new RyaIRI("urn:London"));
+ RyaStatement statement8 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:friendsWith"), new RyaIRI("urn:Bob"));
+ RyaStatement statement9 = new RyaStatement(new RyaIRI("urn:John"), new RyaIRI("urn:travelsTo"), new RyaIRI("urn:SanFrancisco"));
+ RyaStatement statement10 = new RyaStatement(new RyaIRI("urn:John"), new RyaIRI("urn:friendsWith"), new RyaIRI("urn:Evan"));
statement7.setColumnVisibility("U&V&W".getBytes("UTF-8"));
statement8.setColumnVisibility("U&V&W".getBytes("UTF-8"));
statement9.setColumnVisibility("A&B&C".getBytes("UTF-8"));
@@ -242,12 +242,12 @@
+ "?customer <urn:talksTo> ?worker. " + "?worker <urn:livesIn> ?city. " + "?worker <urn:worksAt> <urn:burgerShack>. " + "}";
// Create the Statements that will be loaded into Rya.
- RyaStatement statement1 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:talksTo"), new RyaURI("urn:Bob"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("urn:Bob"), new RyaURI("urn:livesIn"), new RyaURI("urn:London"));
- RyaStatement statement3 = new RyaStatement(new RyaURI("urn:Bob"), new RyaURI("urn:worksAt"), new RyaURI("urn:burgerShack"));
- RyaStatement statement4 = new RyaStatement(new RyaURI("urn:John"), new RyaURI("urn:talksTo"), new RyaURI("urn:Evan"));
- RyaStatement statement5 = new RyaStatement(new RyaURI("urn:Evan"), new RyaURI("urn:livesIn"), new RyaURI("urn:SanFrancisco"));
- RyaStatement statement6 = new RyaStatement(new RyaURI("urn:Evan"), new RyaURI("urn:worksAt"), new RyaURI("urn:burgerShack"));
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:talksTo"), new RyaIRI("urn:Bob"));
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("urn:Bob"), new RyaIRI("urn:livesIn"), new RyaIRI("urn:London"));
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("urn:Bob"), new RyaIRI("urn:worksAt"), new RyaIRI("urn:burgerShack"));
+ RyaStatement statement4 = new RyaStatement(new RyaIRI("urn:John"), new RyaIRI("urn:talksTo"), new RyaIRI("urn:Evan"));
+ RyaStatement statement5 = new RyaStatement(new RyaIRI("urn:Evan"), new RyaIRI("urn:livesIn"), new RyaIRI("urn:SanFrancisco"));
+ RyaStatement statement6 = new RyaStatement(new RyaIRI("urn:Evan"), new RyaIRI("urn:worksAt"), new RyaIRI("urn:burgerShack"));
statement1.setColumnVisibility("U&W".getBytes("UTF-8"));
statement2.setColumnVisibility("V".getBytes("UTF-8"));
statement3.setColumnVisibility("W".getBytes("UTF-8"));
@@ -262,10 +262,10 @@
final Set<RyaSubGraph> results = readAllResults(pcjId);
// Create the expected results of the SPARQL query once the PCJ has been
// computed.
- RyaStatement statement7 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:travelsTo"), new RyaURI("urn:London"));
- RyaStatement statement8 = new RyaStatement(new RyaURI("urn:Joe"), new RyaURI("urn:friendsWith"), new RyaURI("urn:Bob"));
- RyaStatement statement9 = new RyaStatement(new RyaURI("urn:John"), new RyaURI("urn:travelsTo"), new RyaURI("urn:SanFrancisco"));
- RyaStatement statement10 = new RyaStatement(new RyaURI("urn:John"), new RyaURI("urn:friendsWith"), new RyaURI("urn:Evan"));
+ RyaStatement statement7 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:travelsTo"), new RyaIRI("urn:London"));
+ RyaStatement statement8 = new RyaStatement(new RyaIRI("urn:Joe"), new RyaIRI("urn:friendsWith"), new RyaIRI("urn:Bob"));
+ RyaStatement statement9 = new RyaStatement(new RyaIRI("urn:John"), new RyaIRI("urn:travelsTo"), new RyaIRI("urn:SanFrancisco"));
+ RyaStatement statement10 = new RyaStatement(new RyaIRI("urn:John"), new RyaIRI("urn:friendsWith"), new RyaIRI("urn:Evan"));
statement7.setColumnVisibility("U&V&W".getBytes("UTF-8"));
statement8.setColumnVisibility("U&V&W".getBytes("UTF-8"));
statement9.setColumnVisibility("A&B&C".getBytes("UTF-8"));
@@ -331,14 +331,14 @@
// Verify the end results of the query match the expected results.
final Set<RyaSubGraph> results = readAllResults(pcjId);
- RyaStatement statement1 = new RyaStatement(new RyaURI("urn:obs1"), new RyaURI("urn:hasCount"), new RyaType(XMLSchema.INTEGER, "2"));
- RyaStatement statement2 = new RyaStatement(new RyaURI("urn:obs1"), new RyaURI("urn:hasAverageVelocity"), new RyaType(XMLSchema.DECIMAL, "84"));
- RyaStatement statement3 = new RyaStatement(new RyaURI("urn:obs1"), new RyaURI("urn:hasLocation"), new RyaType("Rosslyn"));
- RyaStatement statement4 = new RyaStatement(new RyaURI("urn:obs1"), new RyaURI(RDF.TYPE.toString()), new RyaURI("urn:highSpeedTrafficArea"));
- RyaStatement statement5 = new RyaStatement(new RyaURI("urn:obs2"), new RyaURI("urn:hasCount"), new RyaType(XMLSchema.INTEGER, "2"));
- RyaStatement statement6 = new RyaStatement(new RyaURI("urn:obs2"), new RyaURI("urn:hasAverageVelocity"), new RyaType(XMLSchema.DECIMAL, "79"));
- RyaStatement statement7 = new RyaStatement(new RyaURI("urn:obs2"), new RyaURI("urn:hasLocation"), new RyaType("OldTown"));
- RyaStatement statement8 = new RyaStatement(new RyaURI("urn:obs2"), new RyaURI(RDF.TYPE.toString()), new RyaURI("urn:highSpeedTrafficArea"));
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("urn:obs1"), new RyaIRI("urn:hasCount"), new RyaType(XMLSchema.INTEGER, "2"));
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("urn:obs1"), new RyaIRI("urn:hasAverageVelocity"), new RyaType(XMLSchema.DECIMAL, "84"));
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("urn:obs1"), new RyaIRI("urn:hasLocation"), new RyaType("Rosslyn"));
+ RyaStatement statement4 = new RyaStatement(new RyaIRI("urn:obs1"), new RyaIRI(RDF.TYPE.toString()), new RyaIRI("urn:highSpeedTrafficArea"));
+ RyaStatement statement5 = new RyaStatement(new RyaIRI("urn:obs2"), new RyaIRI("urn:hasCount"), new RyaType(XMLSchema.INTEGER, "2"));
+ RyaStatement statement6 = new RyaStatement(new RyaIRI("urn:obs2"), new RyaIRI("urn:hasAverageVelocity"), new RyaType(XMLSchema.DECIMAL, "79"));
+ RyaStatement statement7 = new RyaStatement(new RyaIRI("urn:obs2"), new RyaIRI("urn:hasLocation"), new RyaType("OldTown"));
+ RyaStatement statement8 = new RyaStatement(new RyaIRI("urn:obs2"), new RyaIRI(RDF.TYPE.toString()), new RyaIRI("urn:highSpeedTrafficArea"));
final Set<RyaSubGraph> expectedResults = new HashSet<>();
diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/RyaExportIT.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/RyaExportIT.java
index eabcd57..912f787 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/RyaExportIT.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/integration/RyaExportIT.java
@@ -27,7 +27,7 @@
import org.apache.fluo.api.client.FluoClient;
import org.apache.fluo.api.client.FluoFactory;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.indexing.pcj.fluo.api.CreateFluoPcj;
import org.apache.rya.indexing.pcj.fluo.api.InsertTriples;
import org.apache.rya.indexing.pcj.storage.PrecomputedJoinStorage;
@@ -62,25 +62,25 @@
// Triples that will be streamed into Fluo after the PCJ has been created.
final ValueFactory vf = SimpleValueFactory.getInstance();
final Set<RyaStatement> streamedTriples = Sets.newHashSet(
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"), new RyaURI("http://Bob")),
- new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://livesIn"), new RyaURI("http://London")),
- new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"), new RyaIRI("http://Bob")),
+ new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://livesIn"), new RyaIRI("http://London")),
+ new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"), new RyaURI("http://Charlie")),
- new RyaStatement(new RyaURI("http://Charlie"), new RyaURI("http://livesIn"), new RyaURI("http://London")),
- new RyaStatement(new RyaURI("http://Charlie"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"), new RyaIRI("http://Charlie")),
+ new RyaStatement(new RyaIRI("http://Charlie"), new RyaIRI("http://livesIn"), new RyaIRI("http://London")),
+ new RyaStatement(new RyaIRI("http://Charlie"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"), new RyaURI("http://David")),
- new RyaStatement(new RyaURI("http://David"), new RyaURI("http://livesIn"), new RyaURI("http://London")),
- new RyaStatement(new RyaURI("http://David"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"), new RyaIRI("http://David")),
+ new RyaStatement(new RyaIRI("http://David"), new RyaIRI("http://livesIn"), new RyaIRI("http://London")),
+ new RyaStatement(new RyaIRI("http://David"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")),
- new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"), new RyaURI("http://Eve")),
- new RyaStatement(new RyaURI("http://Eve"), new RyaURI("http://livesIn"), new RyaURI("http://Leeds")),
- new RyaStatement(new RyaURI("http://Eve"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")),
+ new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"), new RyaIRI("http://Eve")),
+ new RyaStatement(new RyaIRI("http://Eve"), new RyaIRI("http://livesIn"), new RyaIRI("http://Leeds")),
+ new RyaStatement(new RyaIRI("http://Eve"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")),
- new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://talksTo"), new RyaURI("http://Alice")),
- new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://livesIn"), new RyaURI("http://London")),
- new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://worksAt"), new RyaURI("http://Chipotle")));
+ new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://talksTo"), new RyaIRI("http://Alice")),
+ new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://livesIn"), new RyaIRI("http://London")),
+ new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://worksAt"), new RyaIRI("http://Chipotle")));
// The expected results of the SPARQL query once the PCJ has been computed.
final Set<BindingSet> expected = new HashSet<>();
diff --git a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/visibility/PcjVisibilityIT.java b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/visibility/PcjVisibilityIT.java
index 60df148..bb89995 100644
--- a/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/visibility/PcjVisibilityIT.java
+++ b/extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/visibility/PcjVisibilityIT.java
@@ -46,7 +46,7 @@
import org.apache.rya.api.client.RyaClient;
import org.apache.rya.api.client.accumulo.AccumuloRyaClientFactory;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.utils.CloseableIterator;
import org.apache.rya.indexing.accumulo.ConfigUtils;
import org.apache.rya.indexing.external.PrecomputedJoinIndexerConfig;
@@ -191,25 +191,25 @@
// Triples that will be streamed into Fluo after the PCJ has been created.
final Map<RyaStatement, String> streamedTriples = new HashMap<>();
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"),new RyaURI("http://Bob")), "A&B");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://livesIn"),new RyaURI("http://London")), "A");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Bob"), new RyaURI("http://worksAt"),new RyaURI("http://Chipotle")), "B");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"),new RyaIRI("http://Bob")), "A&B");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://livesIn"),new RyaIRI("http://London")), "A");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Bob"), new RyaIRI("http://worksAt"),new RyaIRI("http://Chipotle")), "B");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"),new RyaURI("http://Charlie")), "B&C");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Charlie"), new RyaURI("http://livesIn"),new RyaURI("http://London")), "B");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Charlie"), new RyaURI("http://worksAt"),new RyaURI("http://Chipotle")), "C");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"),new RyaIRI("http://Charlie")), "B&C");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Charlie"), new RyaIRI("http://livesIn"),new RyaIRI("http://London")), "B");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Charlie"), new RyaIRI("http://worksAt"),new RyaIRI("http://Chipotle")), "C");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"),new RyaURI("http://David")), "C&D");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://David"), new RyaURI("http://livesIn"),new RyaURI("http://London")), "C");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://David"), new RyaURI("http://worksAt"),new RyaURI("http://Chipotle")), "D");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"),new RyaIRI("http://David")), "C&D");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://David"), new RyaIRI("http://livesIn"),new RyaIRI("http://London")), "C");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://David"), new RyaIRI("http://worksAt"),new RyaIRI("http://Chipotle")), "D");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Alice"), new RyaURI("http://talksTo"),new RyaURI("http://Eve")), "D&E");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Eve"), new RyaURI("http://livesIn"),new RyaURI("http://Leeds")), "D");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Eve"), new RyaURI("http://worksAt"),new RyaURI("http://Chipotle")), "E");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Alice"), new RyaIRI("http://talksTo"),new RyaIRI("http://Eve")), "D&E");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Eve"), new RyaIRI("http://livesIn"),new RyaIRI("http://Leeds")), "D");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Eve"), new RyaIRI("http://worksAt"),new RyaIRI("http://Chipotle")), "E");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://talksTo"),new RyaURI("http://Alice")), "");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://livesIn"),new RyaURI("http://London")), "");
- addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaURI("http://Frank"), new RyaURI("http://worksAt"),new RyaURI("http://Chipotle")), "");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://talksTo"),new RyaIRI("http://Alice")), "");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://livesIn"),new RyaIRI("http://London")), "");
+ addStatementVisibilityEntry(streamedTriples, new RyaStatement(new RyaIRI("http://Frank"), new RyaIRI("http://worksAt"),new RyaIRI("http://Chipotle")), "");
final Connector accumuloConn = super.getAccumuloConnector();
diff --git a/extras/rya.prospector/src/main/java/org/apache/rya/prospector/plans/impl/CountPlan.java b/extras/rya.prospector/src/main/java/org/apache/rya/prospector/plans/impl/CountPlan.java
index 251c784..f25b67d 100644
--- a/extras/rya.prospector/src/main/java/org/apache/rya/prospector/plans/impl/CountPlan.java
+++ b/extras/rya.prospector/src/main/java/org/apache/rya/prospector/plans/impl/CountPlan.java
@@ -46,7 +46,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.prospector.domain.IndexEntry;
import org.apache.rya.prospector.domain.IntermediateProspect;
import org.apache.rya.prospector.domain.TripleValueType;
@@ -64,8 +64,8 @@
@Override
public Collection<Map.Entry<IntermediateProspect, LongWritable>> map(final RyaStatement ryaStatement) {
- final RyaURI subject = ryaStatement.getSubject();
- final RyaURI predicate = ryaStatement.getPredicate();
+ final RyaIRI subject = ryaStatement.getSubject();
+ final RyaIRI predicate = ryaStatement.getPredicate();
final String subjpred = ryaStatement.getSubject().getData() + DELIM + ryaStatement.getPredicate().getData();
final String predobj = ryaStatement.getPredicate().getData() + DELIM + ryaStatement.getObject().getData();
final String subjobj = ryaStatement.getSubject().getData() + DELIM + ryaStatement.getObject().getData();
diff --git a/extras/rya.prospector/src/test/java/org/apache/rya/joinselect/mr/JoinSelectMapperTest.java b/extras/rya.prospector/src/test/java/org/apache/rya/joinselect/mr/JoinSelectMapperTest.java
index 8b428a5..126dbc4 100644
--- a/extras/rya.prospector/src/test/java/org/apache/rya/joinselect/mr/JoinSelectMapperTest.java
+++ b/extras/rya.prospector/src/test/java/org/apache/rya/joinselect/mr/JoinSelectMapperTest.java
@@ -31,7 +31,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.triple.TripleRow;
import org.apache.rya.api.resolver.triple.TripleRowResolver;
import org.apache.rya.api.resolver.triple.TripleRowResolverException;
@@ -51,7 +51,7 @@
@Test
public void testOutput() throws TripleRowResolverException, IOException {
- RyaStatement rya = new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("mydata1"));
+ RyaStatement rya = new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("mydata1"));
Text s = new Text(rya.getSubject().getData());
Text p = new Text(rya.getPredicate().getData());
Text o = new Text(rya.getObject().getData());
diff --git a/extras/rya.prospector/src/test/java/org/apache/rya/joinselect/mr/JoinSelectStatisticsTest.java b/extras/rya.prospector/src/test/java/org/apache/rya/joinselect/mr/JoinSelectStatisticsTest.java
index 9bbe518..15cd0d4 100644
--- a/extras/rya.prospector/src/test/java/org/apache/rya/joinselect/mr/JoinSelectStatisticsTest.java
+++ b/extras/rya.prospector/src/test/java/org/apache/rya/joinselect/mr/JoinSelectStatisticsTest.java
@@ -42,7 +42,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaTripleContext;
import org.apache.rya.api.resolver.triple.TripleRow;
import org.apache.rya.joinselect.mr.JoinSelectAggregate.JoinReducer;
@@ -99,7 +99,7 @@
private static final String PREFIX = JoinSelectStatisticsTest.class.getSimpleName();
private static final String DELIM = "\u0000";
- private static final String uri = "uri:";
+ private static final String iri = "uri:";
private List<String> cardList = Arrays.asList("subject", "predicate", "object");
private List<String> aggCardList = Arrays.asList("subjectobject", "subjectpredicate", "subjectsubject", "predicateobject", "predicatepredicate", "predicatesubject");
private static File SPOOUT;
@@ -417,7 +417,7 @@
BatchWriter bw_table1 = c.createBatchWriter("rya_spo", new BatchWriterConfig());
for (int i = 1; i < 3; i++) {
- RyaStatement rs = new RyaStatement(new RyaURI(uri + i), new RyaURI(uri + 5), new RyaType(uri + (i + 2)));
+ RyaStatement rs = new RyaStatement(new RyaIRI(iri + i), new RyaIRI(iri + 5), new RyaType(iri + (i + 2)));
Map<TABLE_LAYOUT, TripleRow> tripleRowMap = ryaContext.serializeTriple(rs);
TripleRow tripleRow = tripleRowMap.get(TABLE_LAYOUT.SPO);
Mutation m = JoinSelectStatsUtil.createMutation(tripleRow);
@@ -433,7 +433,7 @@
int j = 1;
for (String s : cardList) {
- Mutation m = new Mutation(new Text(s + DELIM + uri + i + DELIM + i));
+ Mutation m = new Mutation(new Text(s + DELIM + iri + i + DELIM + i));
m.put(new Text(), new Text(), new Value(new IntWritable(i + j).toString().getBytes()));
bw_table2.addMutation(m);
j++;
@@ -457,7 +457,7 @@
}
Scanner scan1 = c.createScanner("rya_selectivity" , new Authorizations());
- scan1.setRange(Range.prefix("predicate" +DELIM + uri + 5));
+ scan1.setRange(Range.prefix("predicate" +DELIM + iri + 5));
int i = 5;
for (Map.Entry<Key, Value> entry : scan1) {
@@ -479,7 +479,7 @@
Scanner scan2 = c.createScanner("rya_selectivity" , new Authorizations());
- scan2.setRange(Range.prefix("object" +DELIM + uri + 3));
+ scan2.setRange(Range.prefix("object" +DELIM + iri + 3));
int j = 5;
for (Map.Entry<Key, Value> entry : scan2) {
@@ -502,7 +502,7 @@
Scanner scan3 = c.createScanner("rya_selectivity", new Authorizations());
- scan3.setRange(Range.prefix("objectsubject" + DELIM + uri + 3 +DELIM +uri +1 ));
+ scan3.setRange(Range.prefix("objectsubject" + DELIM + iri + 3 +DELIM +iri +1 ));
int k = 8;
for (Map.Entry<Key, Value> entry : scan3) {
@@ -536,7 +536,7 @@
BatchWriter bw_table1 = c.createBatchWriter("rya_spo", new BatchWriterConfig());
for (int i = 1; i < 4; i++) {
- RyaStatement rs = new RyaStatement(new RyaURI(uri + 1), new RyaURI(uri + 2), new RyaType(uri + i));
+ RyaStatement rs = new RyaStatement(new RyaIRI(iri + 1), new RyaIRI(iri + 2), new RyaType(iri + i));
Map<TABLE_LAYOUT, TripleRow> tripleRowMap = ryaContext.serializeTriple(rs);
TripleRow tripleRow = tripleRowMap.get(TABLE_LAYOUT.SPO);
Mutation m = JoinSelectStatsUtil.createMutation(tripleRow);
@@ -549,7 +549,7 @@
for (int i = 1; i < 4; i++) {
for (String s : cardList) {
- Mutation m = new Mutation(new Text(s + DELIM + uri + i + DELIM + i));
+ Mutation m = new Mutation(new Text(s + DELIM + iri + i + DELIM + i));
m.put(new Text(), new Text(), new Value(new IntWritable(i + 2).toString().getBytes()));
bw_table2.addMutation(m);
}
@@ -559,7 +559,7 @@
Assert.assertEquals(0, ToolRunner.run(new JoinSelectTestDriver(), new String[]{""}));
Scanner scan1 = c.createScanner("rya_selectivity" , new Authorizations());
- scan1.setRange(Range.prefix("subject" +DELIM + uri + 1));
+ scan1.setRange(Range.prefix("subject" +DELIM + iri + 1));
int i = 0;
for (Map.Entry<Key, Value> entry : scan1) {
@@ -570,7 +570,7 @@
Assert.assertTrue(i == 6);
Scanner scan2 = c.createScanner("rya_selectivity" , new Authorizations());
- scan2.setRange(Range.prefix("predicate" +DELIM + uri + 2));
+ scan2.setRange(Range.prefix("predicate" +DELIM + iri + 2));
int j = 0;
for (Map.Entry<Key, Value> entry : scan2) {
@@ -586,7 +586,7 @@
Assert.assertTrue(j == 6);
Scanner scan3 = c.createScanner("rya_selectivity" , new Authorizations());
- scan3.setRange(Range.prefix("predicateobject" +DELIM + uri + 2 +DELIM + uri + 2));
+ scan3.setRange(Range.prefix("predicateobject" +DELIM + iri + 2 +DELIM + iri + 2));
int k = 0;
for (Map.Entry<Key, Value> entry : scan3) {
@@ -612,7 +612,7 @@
for (int j = 1; j < 3; j++) {
for (int k = 1; k < 3; k++) {
- RyaStatement rs = new RyaStatement(new RyaURI(uri + i), new RyaURI(uri + (j)), new RyaType(uri + k));
+ RyaStatement rs = new RyaStatement(new RyaIRI(iri + i), new RyaIRI(iri + (j)), new RyaType(iri + k));
Map<TABLE_LAYOUT, TripleRow> tripleRowMap = ryaContext.serializeTriple(rs);
TripleRow tripleRow = tripleRowMap.get(TABLE_LAYOUT.SPO);
Mutation m = JoinSelectStatsUtil.createMutation(tripleRow);
@@ -629,7 +629,7 @@
int k = 1;
for (String s : cardList) {
- Mutation m = new Mutation(new Text(s + DELIM + uri + i + DELIM + i));
+ Mutation m = new Mutation(new Text(s + DELIM + iri + i + DELIM + i));
m.put(new Text(), new Text(), new Value(new IntWritable(i + k).toString().getBytes()));
bw_table2.addMutation(m);
k++;
@@ -638,7 +638,7 @@
for (int j = 1; j < 3; j++) {
k = 1;
for (String s : aggCardList) {
- Mutation m = new Mutation(new Text(s + DELIM + uri + i + DELIM + uri + j + DELIM + i));
+ Mutation m = new Mutation(new Text(s + DELIM + iri + i + DELIM + iri + j + DELIM + i));
m.put(new Text(), new Text(), new Value(new IntWritable(i + k +j).toString().getBytes()));
bw_table2.addMutation(m);
k++;
@@ -665,7 +665,7 @@
Scanner scan1 = c.createScanner("rya_selectivity" , new Authorizations());
- scan1.setRange(Range.prefix("subject" +DELIM + uri + 1));
+ scan1.setRange(Range.prefix("subject" +DELIM + iri + 1));
int i = 0;
for (Map.Entry<Key, Value> entry : scan1) {
@@ -722,7 +722,7 @@
break;
}
- RyaStatement rs = new RyaStatement(new RyaURI(uri + i), new RyaURI(uri + (j)), new RyaType(uri + k));
+ RyaStatement rs = new RyaStatement(new RyaIRI(iri + i), new RyaIRI(iri + (j)), new RyaType(iri + k));
Map<TABLE_LAYOUT, TripleRow> tripleRowMap = ryaContext.serializeTriple(rs);
TripleRow tripleRow = tripleRowMap.get(TABLE_LAYOUT.SPO);
Mutation m = JoinSelectStatsUtil.createMutation(tripleRow);
@@ -739,7 +739,7 @@
int k = 1;
for (String s : cardList) {
- Mutation m = new Mutation(new Text(s + DELIM + uri + i + DELIM + i));
+ Mutation m = new Mutation(new Text(s + DELIM + iri + i + DELIM + i));
m.put(new Text(), new Text(), new Value(new IntWritable(i + k).toString().getBytes()));
bw_table2.addMutation(m);
k++;
@@ -748,7 +748,7 @@
for (int j = 1; j < 3; j++) {
k = 1;
for (String s : aggCardList) {
- Mutation m = new Mutation(new Text(s + DELIM + uri + i + DELIM + uri + j + DELIM + i));
+ Mutation m = new Mutation(new Text(s + DELIM + iri + i + DELIM + iri + j + DELIM + i));
m.put(new Text(), new Text(), new Value(new IntWritable(i + k + 2*j).toString().getBytes()));
bw_table2.addMutation(m);
k++;
@@ -775,7 +775,7 @@
Scanner scan1 = c.createScanner("rya_selectivity" , new Authorizations());
- scan1.setRange(Range.prefix("subject" +DELIM + uri + 1));
+ scan1.setRange(Range.prefix("subject" +DELIM + iri + 1));
int i = 0;
for (Map.Entry<Key, Value> entry : scan1) {
@@ -810,7 +810,7 @@
Scanner scan2 = c.createScanner("rya_selectivity" , new Authorizations());
- scan2.setRange(Range.prefix("predicate" +DELIM + uri + 1));
+ scan2.setRange(Range.prefix("predicate" +DELIM + iri + 1));
int j = 0;
for (Map.Entry<Key, Value> entry : scan2) {
diff --git a/extras/rya.prospector/src/test/java/org/apache/rya/prospector/mr/ProspectorTest.java b/extras/rya.prospector/src/test/java/org/apache/rya/prospector/mr/ProspectorTest.java
index 96f2685..06e5005 100644
--- a/extras/rya.prospector/src/test/java/org/apache/rya/prospector/mr/ProspectorTest.java
+++ b/extras/rya.prospector/src/test/java/org/apache/rya/prospector/mr/ProspectorTest.java
@@ -40,7 +40,7 @@
import org.apache.rya.accumulo.AccumuloRyaDAO;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.prospector.domain.IndexEntry;
import org.apache.rya.prospector.domain.TripleValueType;
import org.apache.rya.prospector.service.ProspectorService;
@@ -73,11 +73,11 @@
ryaDAO.setConnector(connector);
ryaDAO.init();
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("mydata1")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("mydata2")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("12")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1235"), new RyaURI("urn:gem#pred"), new RyaType(XMLSchema.INTEGER, "12")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1235"), new RyaURI("urn:gem#pred1"), new RyaType("12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("mydata1")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("mydata2")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1235"), new RyaIRI("urn:gem#pred"), new RyaType(XMLSchema.INTEGER, "12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1235"), new RyaIRI("urn:gem#pred1"), new RyaType("12")));
final String confFile = "stats_cluster_config.xml";
final Path confPath = new Path(getClass().getClassLoader().getResource(confFile).toString());
diff --git a/extras/rya.prospector/src/test/java/org/apache/rya/prospector/service/ProspectorServiceEvalStatsDAOTest.java b/extras/rya.prospector/src/test/java/org/apache/rya/prospector/service/ProspectorServiceEvalStatsDAOTest.java
index b94ed8d..21e3e8f 100644
--- a/extras/rya.prospector/src/test/java/org/apache/rya/prospector/service/ProspectorServiceEvalStatsDAOTest.java
+++ b/extras/rya.prospector/src/test/java/org/apache/rya/prospector/service/ProspectorServiceEvalStatsDAOTest.java
@@ -39,7 +39,7 @@
import org.apache.rya.accumulo.AccumuloRyaDAO;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RdfEvalStatsDAO;
import org.apache.rya.api.persist.RdfEvalStatsDAO.CARDINALITY_OF;
import org.apache.rya.prospector.mr.Prospector;
@@ -73,11 +73,11 @@
ryaDAO.setConnector(connector);
ryaDAO.init();
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("mydata1")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("mydata2")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("12")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1235"), new RyaURI("urn:gem#pred"), new RyaType(XMLSchema.INTEGER, "12")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1235"), new RyaURI("urn:gem#pred1"), new RyaType("12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("mydata1")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("mydata2")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1235"), new RyaIRI("urn:gem#pred"), new RyaType(XMLSchema.INTEGER, "12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1235"), new RyaIRI("urn:gem#pred1"), new RyaType("12")));
final String confFile = "stats_cluster_config.xml";
final Path confPath = new Path(getClass().getClassLoader().getResource(confFile).toString());
@@ -130,11 +130,11 @@
ryaDAO.setConnector(connector);
ryaDAO.init();
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("mydata1")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("mydata2")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1234"), new RyaURI("urn:gem#pred"), new RyaType("12")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1235"), new RyaURI("urn:gem#pred"), new RyaType(XMLSchema.INTEGER, "12")));
- ryaDAO.add(new RyaStatement(new RyaURI("urn:gem:etype#1235"), new RyaURI("urn:gem#pred1"), new RyaType("12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("mydata1")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("mydata2")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1234"), new RyaIRI("urn:gem#pred"), new RyaType("12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1235"), new RyaIRI("urn:gem#pred"), new RyaType(XMLSchema.INTEGER, "12")));
+ ryaDAO.add(new RyaStatement(new RyaIRI("urn:gem:etype#1235"), new RyaIRI("urn:gem#pred1"), new RyaType("12")));
final String confFile = "stats_cluster_config.xml";
final Path confPath = new Path(getClass().getClassLoader().getResource(confFile).toString());
diff --git a/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/LocalReasoner.java b/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/LocalReasoner.java
index 921d0cf..67157cf 100644
--- a/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/LocalReasoner.java
+++ b/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/LocalReasoner.java
@@ -112,7 +112,7 @@
}
// Otherwise, consider the semantics of the statement:
Resource subject = fact.getSubject();
- IRI predURI = fact.getPredicate();
+ IRI predIRI = fact.getPredicate();
Value object = fact.getObject();
boolean relevantToSubject = false;
boolean relevantToObject = false;
@@ -121,18 +121,18 @@
// Type statements could be relevant to the subject, if the schema gives
// them any meaning:
- if (predURI.equals(RDF.TYPE)) {
+ if (predIRI.equals(RDF.TYPE)) {
// Assume the object is a valid URI
- Resource typeURI = (Resource) fact.getObject();
- if (typeURI.equals(OWL.NOTHING)
- || schema.hasClass(typeURI)) {
+ Resource typeIRI = (Resource) fact.getObject();
+ if (typeIRI.equals(OWL.NOTHING)
+ || schema.hasClass(typeIRI)) {
relevantToSubject = true;
}
}
// If the schema knows about the property:
- if (schema.hasProperty(predURI)) {
- OwlProperty prop = schema.getProperty(predURI);
+ if (schema.hasProperty(predIRI)) {
+ OwlProperty prop = schema.getProperty(predIRI);
// Relevant to both:
// Any statement with an asymmetric property
@@ -185,7 +185,7 @@
return Relevance.NONE;
}
// Otherwise, consider the semantics of the statement:
- IRI predURI = fact.getPredicate();
+ IRI predIRI = fact.getPredicate();
Value object = fact.getObject();
boolean relevantToSubject = false;
boolean relevantToObject = false;
@@ -193,10 +193,10 @@
boolean literalObject = object instanceof Literal;
// Type statements can be joined if...
- if (predURI.equals(RDF.TYPE)) {
- Resource typeURI = (Resource) fact.getObject();
- if (schema.hasClass(typeURI)) {
- OwlClass c = schema.getClass(typeURI);
+ if (predIRI.equals(RDF.TYPE)) {
+ Resource typeIRI = (Resource) fact.getObject();
+ if (schema.hasClass(typeIRI)) {
+ OwlClass c = schema.getClass(typeIRI);
// 1. the type is a property restriction
if (!c.getOnProperty().isEmpty()
// 2. the type is relevant to a property restriction
@@ -212,8 +212,8 @@
}
// If the schema knows about the property:
- if (schema.hasProperty(predURI)) {
- OwlProperty prop = schema.getProperty(predURI);
+ if (schema.hasProperty(predIRI)) {
+ OwlProperty prop = schema.getProperty(predIRI);
// transitivity: relevant to both
if (prop.isTransitive()) {
relevantToSubject = true;
diff --git a/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/OwlClass.java b/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/OwlClass.java
index c3c60a8..364be52 100644
--- a/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/OwlClass.java
+++ b/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/OwlClass.java
@@ -56,7 +56,7 @@
*/
public class OwlClass implements Serializable {
private static final long serialVersionUID = 1L;
- private Resource uri;
+ private Resource iri;
// Relations to other classes:
private Set<OwlClass> superClasses = new HashSet<>();
@@ -78,12 +78,12 @@
int maxCardinality = -1;
int maxQualifiedCardinality = -1;
- OwlClass(Resource uri) {
- this.uri = uri;
+ OwlClass(Resource iri) {
+ this.iri = iri;
}
- public Resource getURI() { return uri; }
- public void setURI(Resource uri) { this.uri = uri; }
+ public Resource getURI() { return iri; }
+ public void setURI(Resource iri) { this.iri = iri; }
/**
* Add a superclass
@@ -235,10 +235,10 @@
public Set<Resource> getSuperClasses() {
Set<Resource> ancestors = new HashSet<>();
for (OwlClass ancestor : superClasses) {
- ancestors.add(ancestor.uri);
+ ancestors.add(ancestor.iri);
}
// RL rule scm-cls: Every class is a subclass of itself and owl:Thing
- ancestors.add(this.uri);
+ ancestors.add(this.iri);
ancestors.add(OWL.THING);
return ancestors;
}
@@ -252,11 +252,11 @@
Set<Resource> equivalents = new HashSet<>();
for (OwlClass other : superClasses) {
if (other.superClasses.contains(this)) {
- equivalents.add(other.uri);
+ equivalents.add(other.iri);
}
}
// RL rule scm-cls: Every class is its own equivalent
- equivalents.add(this.uri);
+ equivalents.add(this.iri);
return equivalents;
}
@@ -266,7 +266,7 @@
public Set<Resource> getDisjointClasses() {
Set<Resource> disjoint = new HashSet<>();
for (OwlClass other : disjointClasses) {
- disjoint.add(other.uri);
+ disjoint.add(other.iri);
}
return disjoint;
}
@@ -277,7 +277,7 @@
public Set<Resource> getComplementaryClasses() {
Set<Resource> complements = new HashSet<>();
for (OwlClass other : complementaryClasses) {
- complements.add(other.uri);
+ complements.add(other.iri);
}
return complements;
}
diff --git a/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/OwlProperty.java b/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/OwlProperty.java
index e745532..426a228 100644
--- a/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/OwlProperty.java
+++ b/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/OwlProperty.java
@@ -65,7 +65,7 @@
public class OwlProperty implements Serializable {
private static final long serialVersionUID = 1L;
- private IRI uri;
+ private IRI iri;
// Boolean qualities the property might have
private boolean transitive = false;
@@ -87,8 +87,8 @@
// Restrictions on this property
private Set<OwlClass> restrictions = new HashSet<OwlClass>();
- OwlProperty(IRI uri) {
- this.uri = uri;
+ OwlProperty(IRI iri) {
+ this.iri = iri;
}
boolean addSuperProperty(OwlProperty p) {
@@ -115,7 +115,7 @@
}
boolean addRestriction(OwlClass r) { return restrictions.add(r); }
- public void setURI(IRI uri) { this.uri = uri; }
+ public void setURI(IRI iri) { this.iri = iri; }
void setTransitive() { transitive = true; }
void setSymmetric() { symmetric = true; }
void setAsymmetric() { asymmetric = true; }
@@ -123,7 +123,7 @@
void setInverseFunctional() { inverseFunctional = true; }
void setIrreflexive() { irreflexive = true; }
- public IRI getURI() { return uri; }
+ public IRI getURI() { return iri; }
public boolean isTransitive() { return transitive; }
public boolean isSymmetric() { return symmetric; }
public boolean isAsymmetric() { return asymmetric; }
@@ -188,10 +188,10 @@
public Set<IRI> getSuperProperties() {
Set<IRI> ancestors = new HashSet<>();
for (OwlProperty ancestor : superProperties) {
- ancestors.add(ancestor.uri);
+ ancestors.add(ancestor.iri);
}
// RL rules scm-op & scm-dp: Every property is a subproperty of itself
- ancestors.add(this.uri);
+ ancestors.add(this.iri);
return ancestors;
}
@@ -203,11 +203,11 @@
Set<IRI> equivalents = new HashSet<>();
for (OwlProperty other : superProperties) {
if (other.superProperties.contains(this)) {
- equivalents.add(other.uri);
+ equivalents.add(other.iri);
}
}
// RL rules scm-op & scm-dp: Every property is equivalent to itself
- equivalents.add(this.uri);
+ equivalents.add(this.iri);
return equivalents;
}
@@ -217,7 +217,7 @@
public Set<IRI> getDisjointProperties() {
Set<IRI> disjoint = new HashSet<>();
for (OwlProperty other : disjointProperties) {
- disjoint.add(other.uri);
+ disjoint.add(other.iri);
}
return disjoint;
}
@@ -228,13 +228,13 @@
public Set<IRI> getInverseProperties() {
Set<IRI> inverse = new HashSet<>();
for (OwlProperty other : inverseProperties) {
- inverse.add(other.uri);
+ inverse.add(other.iri);
}
return inverse;
}
/**
- * Get the domain (set of class URIs/Resources).
+ * Get the domain (set of class IRIs/Resources).
*/
public Set<Resource> getDomain() {
Set<Resource> domain = new HashSet<>();
diff --git a/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/mr/ConformanceTest.java b/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/mr/ConformanceTest.java
index 87f1c8b..d3c6bcb 100644
--- a/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/mr/ConformanceTest.java
+++ b/extras/rya.reasoning/src/main/java/org/apache/rya/reasoning/mr/ConformanceTest.java
@@ -87,7 +87,7 @@
static String TEST_RDFBASED = TEST + "RDF-BASED";
private static class OwlTest extends AbstractRDFHandler {
- Value uri;
+ Value iri;
String name;
String description;
String premise;
@@ -211,7 +211,7 @@
// Run the conformance tests
int result;
for (final OwlTest test : conformanceTests) {
- System.out.println(test.uri);
+ System.out.println(test.iri);
result = runTest(conf, args, test);
if (result != 0) {
return result;
@@ -386,7 +386,7 @@
}
else {
test = new OwlTest();
- test.uri = iri;
+ test.iri = iri;
test.name = bindings.getValue("name").stringValue();
test.description = bindings.getValue("description").stringValue();
test.premise = bindings.getValue("graph").stringValue();
diff --git a/extras/rya.reasoning/src/test/java/org/apache/rya/reasoning/TestUtils.java b/extras/rya.reasoning/src/test/java/org/apache/rya/reasoning/TestUtils.java
index bec124b..2a2c90f 100644
--- a/extras/rya.reasoning/src/test/java/org/apache/rya/reasoning/TestUtils.java
+++ b/extras/rya.reasoning/src/test/java/org/apache/rya/reasoning/TestUtils.java
@@ -20,7 +20,7 @@
*/
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.model.BNode;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Literal;
@@ -72,7 +72,7 @@
}
public static RyaStatement ryaStatement(String s, String p, String o) {
- return new RyaStatement(new RyaURI(TEST_PREFIX + "#" + s),
- new RyaURI(TEST_PREFIX + "#" + p), new RyaURI(TEST_PREFIX + "#" + o));
+ return new RyaStatement(new RyaIRI(TEST_PREFIX + "#" + s),
+ new RyaIRI(TEST_PREFIX + "#" + p), new RyaIRI(TEST_PREFIX + "#" + o));
}
}
diff --git a/extras/rya.streams/integration/src/test/java/org/apache/rya/streams/kafka/processors/filter/TemporalFilterIT.java b/extras/rya.streams/integration/src/test/java/org/apache/rya/streams/kafka/processors/filter/TemporalFilterIT.java
index 15c33ee..680c095 100644
--- a/extras/rya.streams/integration/src/test/java/org/apache/rya/streams/kafka/processors/filter/TemporalFilterIT.java
+++ b/extras/rya.streams/integration/src/test/java/org/apache/rya/streams/kafka/processors/filter/TemporalFilterIT.java
@@ -30,7 +30,7 @@
import org.apache.kafka.streams.processor.TopologyBuilder;
import org.apache.rya.api.function.projection.RandomUUIDFactory;
-import org.apache.rya.api.function.temporal.TemporalURIs;
+import org.apache.rya.api.function.temporal.TemporalIRIs;
import org.apache.rya.api.model.VisibilityBindingSet;
import org.apache.rya.api.model.VisibilityStatement;
import org.apache.rya.streams.kafka.KafkaTopics;
@@ -89,7 +89,7 @@
// Get the RDF model objects that will be used to build the query.
final String sparql =
"PREFIX time: <http://www.w3.org/2006/time/> \n"
- + "PREFIX tempf: <" + TemporalURIs.NAMESPACE + ">\n"
+ + "PREFIX tempf: <" + TemporalIRIs.NAMESPACE + ">\n"
+ "SELECT * \n"
+ "WHERE { \n"
+ " <urn:time> time:atTime ?date .\n"
@@ -122,7 +122,7 @@
// Get the RDF model objects that will be used to build the query.
final String sparql =
"PREFIX time: <http://www.w3.org/2006/time/> \n"
- + "PREFIX tempf: <" + TemporalURIs.NAMESPACE + ">\n"
+ + "PREFIX tempf: <" + TemporalIRIs.NAMESPACE + ">\n"
+ "SELECT * \n"
+ "WHERE { \n"
+ " <urn:time> time:atTime ?date .\n"
@@ -155,7 +155,7 @@
// Get the RDF model objects that will be used to build the query.
final String sparql =
"PREFIX time: <http://www.w3.org/2006/time/> \n"
- + "PREFIX tempf: <" + TemporalURIs.NAMESPACE + ">\n"
+ + "PREFIX tempf: <" + TemporalIRIs.NAMESPACE + ">\n"
+ "SELECT * \n"
+ "WHERE { \n"
+ " <urn:time> time:atTime ?date .\n"
@@ -188,7 +188,7 @@
// Get the RDF model objects that will be used to build the query.
final String sparql =
"PREFIX time: <http://www.w3.org/2006/time/> \n"
- + "PREFIX tempf: <" + TemporalURIs.NAMESPACE + ">\n"
+ + "PREFIX tempf: <" + TemporalIRIs.NAMESPACE + ">\n"
+ "SELECT * \n"
+ "WHERE { \n"
+ " <urn:time> time:atTime ?date .\n"
diff --git a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/GraphXEdgeInputFormat.java b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/GraphXEdgeInputFormat.java
index eac06c6..1670e23 100644
--- a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/GraphXEdgeInputFormat.java
+++ b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/GraphXEdgeInputFormat.java
@@ -186,9 +186,9 @@
}
public static long getVertexId(final RyaType resource) throws IOException {
- String uri = "";
+ String iri = "";
if (resource != null) {
- uri = resource.getData().toString();
+ iri = resource.getData().toString();
}
try {
// SHA-256 the string value and then generate a hashcode from
@@ -197,7 +197,7 @@
// collision ratio
final MessageDigest messageDigest = MessageDigest
.getInstance("SHA-256");
- messageDigest.update(uri.getBytes(StandardCharsets.UTF_8));
+ messageDigest.update(iri.getBytes(StandardCharsets.UTF_8));
final String encryptedString = new String(messageDigest.digest(), StandardCharsets.UTF_8);
return hash(encryptedString);
}
diff --git a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/RyaOutputFormat.java b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/RyaOutputFormat.java
index 0dd08b1..6d964ea 100644
--- a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/RyaOutputFormat.java
+++ b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/RyaOutputFormat.java
@@ -52,7 +52,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaTripleContext;
@@ -301,7 +301,7 @@
private final RyaTripleContext tripleContext;
private MultiTableBatchWriter writer;
private byte[] cv = AccumuloRdfConstants.EMPTY_CV.getExpression();
- private RyaURI defaultContext = null;
+ private RyaIRI defaultContext = null;
private static final long ONE_MEGABYTE = 1024L * 1024L;
private static final long AVE_STATEMENT_SIZE = 100L;
@@ -336,7 +336,7 @@
// set the default context
final String context = conf.get(CONTEXT_PROPERTY, "");
if (context != null && !context.isEmpty()) {
- defaultContext = new RyaURI(context);
+ defaultContext = new RyaIRI(context);
}
// set up the buffer
@@ -485,10 +485,10 @@
}
private int statementSize(final RyaStatement ryaStatement) {
- final RyaURI subject = ryaStatement.getSubject();
- final RyaURI predicate = ryaStatement.getPredicate();
+ final RyaIRI subject = ryaStatement.getSubject();
+ final RyaIRI predicate = ryaStatement.getPredicate();
final RyaType object = ryaStatement.getObject();
- final RyaURI context = ryaStatement.getContext();
+ final RyaIRI context = ryaStatement.getContext();
int size = 3 + subject.getData().length() + predicate.getData().length() + object.getData().length();
if (!XMLSchema.ANYURI.equals(object.getDataType())) {
size += 2 + object.getDataType().toString().length();
diff --git a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/RyaStatementWritable.java b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/RyaStatementWritable.java
index 0e8f43d..37e8d95 100644
--- a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/RyaStatementWritable.java
+++ b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/RyaStatementWritable.java
@@ -38,7 +38,7 @@
/**
* Basic {@link WritableComparable} for using Rya data with Hadoop.
* RyaStatementWritable wraps a {@link RyaStatement}, which in turn represents a
- * statement as a collection of {@link org.apache.rya.api.domain.RyaURI} and
+ * statement as a collection of {@link org.apache.rya.api.domain.RyaIRI} and
* {@link org.apache.rya.api.domain.RyaType} objects.
* <p>
* This class is mutable, like all {@link org.apache.hadoop.io.Writable}s. When
diff --git a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/examples/TextOutputExample.java b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/examples/TextOutputExample.java
index 593e568..fa10237 100644
--- a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/examples/TextOutputExample.java
+++ b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/examples/TextOutputExample.java
@@ -46,7 +46,7 @@
import org.apache.rya.accumulo.mr.MRUtils;
import org.apache.rya.accumulo.mr.RyaStatementWritable;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.eclipse.rdf4j.model.Statement;
@@ -85,12 +85,12 @@
dao.setConf(conf);
dao.init();
String ns = "http://example.com/";
- dao.add(new RyaStatement(new RyaURI(ns+"s1"), new RyaURI(ns+"p1"), new RyaURI(ns+"o1")));
- dao.add(new RyaStatement(new RyaURI(ns+"s1"), new RyaURI(ns+"p2"), new RyaURI(ns+"o2")));
- dao.add(new RyaStatement(new RyaURI(ns+"s2"), new RyaURI(ns+"p1"), new RyaURI(ns+"o3"),
- new RyaURI(ns+"g1")));
- dao.add(new RyaStatement(new RyaURI(ns+"s3"), new RyaURI(ns+"p3"), new RyaURI(ns+"o3"),
- new RyaURI(ns+"g2")));
+ dao.add(new RyaStatement(new RyaIRI(ns+"s1"), new RyaIRI(ns+"p1"), new RyaIRI(ns+"o1")));
+ dao.add(new RyaStatement(new RyaIRI(ns+"s1"), new RyaIRI(ns+"p2"), new RyaIRI(ns+"o2")));
+ dao.add(new RyaStatement(new RyaIRI(ns+"s2"), new RyaIRI(ns+"p1"), new RyaIRI(ns+"o3"),
+ new RyaIRI(ns+"g1")));
+ dao.add(new RyaStatement(new RyaIRI(ns+"s3"), new RyaIRI(ns+"p3"), new RyaIRI(ns+"o3"),
+ new RyaIRI(ns+"g2")));
dao.destroy();
}
diff --git a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/tools/AccumuloRdfCountTool.java b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/tools/AccumuloRdfCountTool.java
index c2ad57a..5c68291 100644
--- a/mapreduce/src/main/java/org/apache/rya/accumulo/mr/tools/AccumuloRdfCountTool.java
+++ b/mapreduce/src/main/java/org/apache/rya/accumulo/mr/tools/AccumuloRdfCountTool.java
@@ -43,7 +43,7 @@
import org.apache.rya.accumulo.mr.MRUtils;
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaTripleContext;
import org.apache.rya.api.resolver.triple.TripleRow;
import org.apache.rya.api.resolver.triple.TripleRowResolverException;
@@ -152,7 +152,7 @@
final String subj = statement.getSubject().getData();
final String pred = statement.getPredicate().getData();
// byte[] objBytes = tripleFormat.getValueFormat().serialize(statement.getObject());
- final RyaURI scontext = statement.getContext();
+ final RyaIRI scontext = statement.getContext();
final boolean includesContext = scontext != null;
final String scontext_str = (includesContext) ? scontext.getData() : null;
diff --git a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/GraphXEdgeInputFormatTest.java b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/GraphXEdgeInputFormatTest.java
index 6686c8f..0c9c06c 100644
--- a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/GraphXEdgeInputFormatTest.java
+++ b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/GraphXEdgeInputFormatTest.java
@@ -24,7 +24,7 @@
import org.apache.rya.accumulo.AccumuloRyaDAO;
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Instance;
@@ -78,9 +78,9 @@
@Test
public void testInputFormat() throws Exception {
RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI("http://www.google.com"))
- .setPredicate(new RyaURI("http://some_other_uri"))
- .setObject(new RyaURI("http://www.yahoo.com"))
+ .setSubject(new RyaIRI("http://www.google.com"))
+ .setPredicate(new RyaIRI("http://some_other_uri"))
+ .setObject(new RyaIRI("http://www.yahoo.com"))
.setColumnVisibility(new byte[0])
.setValue(new byte[0])
.build();
diff --git a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/GraphXInputFormatTest.java b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/GraphXInputFormatTest.java
index b2a663c..93df522 100644
--- a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/GraphXInputFormatTest.java
+++ b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/GraphXInputFormatTest.java
@@ -25,7 +25,7 @@
import org.apache.rya.accumulo.mr.GraphXInputFormat.RyaStatementRecordReader;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.accumulo.core.client.Connector;
import org.apache.accumulo.core.client.Instance;
@@ -78,9 +78,9 @@
@Test
public void testInputFormat() throws Exception {
RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI("http://www.google.com"))
- .setPredicate(new RyaURI("http://some_other_uri"))
- .setObject(new RyaURI("http://www.yahoo.com"))
+ .setSubject(new RyaIRI("http://www.google.com"))
+ .setPredicate(new RyaIRI("http://some_other_uri"))
+ .setObject(new RyaIRI("http://www.yahoo.com"))
.setColumnVisibility(new byte[0])
.setValue(new byte[0])
.build();
diff --git a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaInputFormatTest.java b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaInputFormatTest.java
index f571682..0c9763c 100644
--- a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaInputFormatTest.java
+++ b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaInputFormatTest.java
@@ -40,7 +40,7 @@
import org.apache.rya.accumulo.mr.RyaInputFormat.RyaStatementRecordReader;
import org.apache.rya.api.RdfCloudTripleStoreConstants.TABLE_LAYOUT;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -85,9 +85,9 @@
RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI("http://www.google.com"))
- .setPredicate(new RyaURI("http://some_other_uri"))
- .setObject(new RyaURI("http://www.yahoo.com"))
+ .setSubject(new RyaIRI("http://www.google.com"))
+ .setPredicate(new RyaIRI("http://some_other_uri"))
+ .setObject(new RyaIRI("http://www.yahoo.com"))
.setColumnVisibility(new byte[0])
.setValue(new byte[0])
.build();
diff --git a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaOutputFormatTest.java b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaOutputFormatTest.java
index e0a7ac0..a2691d6 100644
--- a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaOutputFormatTest.java
+++ b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaOutputFormatTest.java
@@ -23,7 +23,7 @@
import org.apache.rya.accumulo.AccumuloRyaDAO;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.apache.rya.api.resolver.RyaTripleContext;
@@ -117,12 +117,12 @@
@Test
public void testOutputFormat() throws Exception {
final RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI("http://www.google.com"))
- .setPredicate(new RyaURI("http://some_other_uri"))
- .setObject(new RyaURI("http://www.yahoo.com"))
+ .setSubject(new RyaIRI("http://www.google.com"))
+ .setPredicate(new RyaIRI("http://some_other_uri"))
+ .setObject(new RyaIRI("http://www.yahoo.com"))
.setColumnVisibility(CV.getBytes())
.setValue(new byte[0])
- .setContext(new RyaURI(GRAPH))
+ .setContext(new RyaIRI(GRAPH))
.build();
RyaOutputFormat.setCoreTablesEnabled(job, true);
RyaOutputFormat.setFreeTextEnabled(job, false);
@@ -135,18 +135,18 @@
@Test
public void testDefaultCV() throws Exception {
final RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI("http://www.google.com"))
- .setPredicate(new RyaURI("http://some_other_uri"))
- .setObject(new RyaURI("http://www.yahoo.com"))
+ .setSubject(new RyaIRI("http://www.google.com"))
+ .setPredicate(new RyaIRI("http://some_other_uri"))
+ .setObject(new RyaIRI("http://www.yahoo.com"))
.setValue(new byte[0])
- .setContext(new RyaURI(GRAPH))
+ .setContext(new RyaIRI(GRAPH))
.build();
final RyaStatement expected = RyaStatement.builder()
- .setSubject(new RyaURI("http://www.google.com"))
- .setPredicate(new RyaURI("http://some_other_uri"))
- .setObject(new RyaURI("http://www.yahoo.com"))
+ .setSubject(new RyaIRI("http://www.google.com"))
+ .setPredicate(new RyaIRI("http://some_other_uri"))
+ .setObject(new RyaIRI("http://www.yahoo.com"))
.setValue(new byte[0])
- .setContext(new RyaURI(GRAPH))
+ .setContext(new RyaIRI(GRAPH))
.setColumnVisibility(CV.getBytes())
.build();
RyaOutputFormat.setCoreTablesEnabled(job, true);
@@ -161,19 +161,19 @@
@Test
public void testDefaultGraph() throws Exception {
final RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI("http://www.google.com"))
- .setPredicate(new RyaURI("http://some_other_uri"))
- .setObject(new RyaURI("http://www.yahoo.com"))
+ .setSubject(new RyaIRI("http://www.google.com"))
+ .setPredicate(new RyaIRI("http://some_other_uri"))
+ .setObject(new RyaIRI("http://www.yahoo.com"))
.setValue(new byte[0])
.setColumnVisibility(CV.getBytes())
.build();
final RyaStatement expected = RyaStatement.builder()
- .setSubject(new RyaURI("http://www.google.com"))
- .setPredicate(new RyaURI("http://some_other_uri"))
- .setObject(new RyaURI("http://www.yahoo.com"))
+ .setSubject(new RyaIRI("http://www.google.com"))
+ .setPredicate(new RyaIRI("http://some_other_uri"))
+ .setObject(new RyaIRI("http://www.yahoo.com"))
.setValue(new byte[0])
.setColumnVisibility(CV.getBytes())
- .setContext(new RyaURI(GRAPH))
+ .setContext(new RyaIRI(GRAPH))
.build();
RyaOutputFormat.setCoreTablesEnabled(job, true);
RyaOutputFormat.setFreeTextEnabled(job, false);
@@ -189,8 +189,8 @@
final AccumuloFreeTextIndexer ft = new AccumuloFreeTextIndexer();
ft.setConf(conf);
final RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI(GRAPH + ":s"))
- .setPredicate(new RyaURI(GRAPH + ":p"))
+ .setSubject(new RyaIRI(GRAPH + ":s"))
+ .setPredicate(new RyaIRI(GRAPH + ":p"))
.setObject(new RyaType(XMLSchema.STRING, "one two three four five"))
.build();
RyaOutputFormat.setCoreTablesEnabled(job, false);
@@ -227,8 +227,8 @@
for (int i = 0; i < instants.length; i++) {
final RyaType time = RdfToRyaConversions.convertLiteral(vf.createLiteral(instants[i].toString()));
final RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI(GRAPH + ":s"))
- .setPredicate(new RyaURI(GRAPH + ":p"))
+ .setSubject(new RyaIRI(GRAPH + ":s"))
+ .setPredicate(new RyaIRI(GRAPH + ":p"))
.setObject(time)
.build();
write(input);
@@ -260,9 +260,9 @@
final EntityCentricIndex entity = new EntityCentricIndex();
entity.setConf(conf);
final RyaStatement input = RyaStatement.builder()
- .setSubject(new RyaURI(GRAPH + ":s"))
- .setPredicate(new RyaURI(GRAPH + ":p"))
- .setObject(new RyaURI(GRAPH + ":o"))
+ .setSubject(new RyaIRI(GRAPH + ":s"))
+ .setPredicate(new RyaIRI(GRAPH + ":p"))
+ .setObject(new RyaIRI(GRAPH + ":o"))
.build();
RyaOutputFormat.setCoreTablesEnabled(job, false);
RyaOutputFormat.setFreeTextEnabled(job, false);
diff --git a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaStatementWritableTest.java b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaStatementWritableTest.java
index 98d36c9..fc0ee4d 100644
--- a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaStatementWritableTest.java
+++ b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/RyaStatementWritableTest.java
@@ -8,7 +8,7 @@
import org.apache.rya.accumulo.AccumuloRdfConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RyaTripleContext;
import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
import org.junit.Assert;
@@ -36,14 +36,14 @@
*/
public class RyaStatementWritableTest {
- private static final RyaURI s1 = new RyaURI(":s");
- private static final RyaURI p1 = new RyaURI(":p");
+ private static final RyaIRI s1 = new RyaIRI(":s");
+ private static final RyaIRI p1 = new RyaIRI(":p");
private static final RyaType o1 = new RyaType(XMLSchema.INTEGER, "123");
- private static final RyaURI s2 = new RyaURI(":s2");
- private static final RyaURI p2 = new RyaURI(":p2");
+ private static final RyaIRI s2 = new RyaIRI(":s2");
+ private static final RyaIRI p2 = new RyaIRI(":p2");
private static final RyaType o2 = new RyaType(XMLSchema.STRING, "123");
- private static final RyaURI graph1 = new RyaURI("http://example.org/graph1");
- private static final RyaURI graph2 = new RyaURI("http://example.org/graph2");
+ private static final RyaIRI graph1 = new RyaIRI("http://example.org/graph1");
+ private static final RyaIRI graph2 = new RyaIRI("http://example.org/graph2");
private static final byte[] cv1 = "test_visibility".getBytes();
private static final long t1 = 1000;
private static final long t2 = 1001;
diff --git a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/AccumuloRdfCountToolTest.java b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/AccumuloRdfCountToolTest.java
index ae15b65..7f49ac5 100644
--- a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/AccumuloRdfCountToolTest.java
+++ b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/AccumuloRdfCountToolTest.java
@@ -40,7 +40,7 @@
import org.apache.rya.accumulo.AccumuloRyaDAO;
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.eclipse.rdf4j.model.ValueFactory;
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
@@ -105,8 +105,8 @@
@Test
public void testMR() throws Exception {
- RyaURI test1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "test1"));
- RyaURI pred1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "pred1"));
+ RyaIRI test1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "test1"));
+ RyaIRI pred1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "pred1"));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(0))));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(1))));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(2))));
@@ -197,8 +197,8 @@
@Test
public void testTTL() throws Exception {
- RyaURI test1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "test1"));
- RyaURI pred1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "pred1"));
+ RyaIRI test1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "test1"));
+ RyaIRI pred1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "pred1"));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(0))));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(1))));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(2))));
@@ -231,9 +231,9 @@
@Test
public void testContext() throws Exception {
- RyaURI test1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "test1"));
- RyaURI pred1 = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "pred1"));
- RyaURI cntxt = RdfToRyaConversions.convertURI(VF.createIRI(litdupsNS, "cntxt"));
+ RyaIRI test1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "test1"));
+ RyaIRI pred1 = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "pred1"));
+ RyaIRI cntxt = RdfToRyaConversions.convertIRI(VF.createIRI(litdupsNS, "cntxt"));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(0)), cntxt));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(1)), cntxt));
dao.add(new RyaStatement(test1, pred1, RdfToRyaConversions.convertLiteral(VF.createLiteral(2)), cntxt));
diff --git a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/RdfFileInputToolTest.java b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/RdfFileInputToolTest.java
index b8b2384..8f92cf1 100644
--- a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/RdfFileInputToolTest.java
+++ b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/RdfFileInputToolTest.java
@@ -31,7 +31,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.rio.RDFFormat;
import org.junit.Test;
@@ -93,9 +93,9 @@
"-Drdf.format=" + RDFFormat.NTRIPLES.getName(),
"src/test/resources/test.ntriples",
});
- RyaStatement rs = new RyaStatement(new RyaURI("urn:lubm:rdfts#GraduateStudent01"),
- new RyaURI("urn:lubm:rdfts#hasFriend"),
- new RyaURI("urn:lubm:rdfts#GraduateStudent02"));
+ RyaStatement rs = new RyaStatement(new RyaIRI("urn:lubm:rdfts#GraduateStudent01"),
+ new RyaIRI("urn:lubm:rdfts#hasFriend"),
+ new RyaIRI("urn:lubm:rdfts#GraduateStudent02"));
rs.setColumnVisibility(auths.toString().getBytes());
AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
conf.setTablePrefix(tablePrefix);
@@ -116,10 +116,10 @@
"-Drdf.format=" + RDFFormat.TRIG.getName(),
"src/test/resources/namedgraphs.trig",
});
- RyaStatement rs = new RyaStatement(new RyaURI("http://www.example.org/exampleDocument#Monica"),
- new RyaURI("http://www.example.org/vocabulary#name"),
+ RyaStatement rs = new RyaStatement(new RyaIRI("http://www.example.org/exampleDocument#Monica"),
+ new RyaIRI("http://www.example.org/vocabulary#name"),
new RyaType("Monica Murphy"),
- new RyaURI("http://www.example.org/exampleDocument#G1"));
+ new RyaIRI("http://www.example.org/exampleDocument#G1"));
rs.setColumnVisibility(auths.toString().getBytes());
AccumuloRdfConfiguration conf = new AccumuloRdfConfiguration();
conf.setTablePrefix(tablePrefix);
diff --git a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/Upgrade322ToolTest.java b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/Upgrade322ToolTest.java
index cfdbeb7..eed87af 100644
--- a/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/Upgrade322ToolTest.java
+++ b/mapreduce/src/test/java/org/apache/rya/accumulo/mr/tools/Upgrade322ToolTest.java
@@ -41,7 +41,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
import junit.framework.TestCase;
@@ -219,41 +219,41 @@
final AccumuloRyaQueryEngine queryEngine = ryaDAO.getQueryEngine();
TestUtils.verify(new RyaStatement(
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uuid10"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns#booleanLit"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uuid10"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#booleanLit"),
new RyaType(XMLSchema.BOOLEAN, "true")), queryEngine);
TestUtils.verify(new RyaStatement(
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uuid10"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns#longLit"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uuid10"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#longLit"),
new RyaType(XMLSchema.LONG, "10")), queryEngine);
TestUtils.verify(new RyaStatement(
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uuid10"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns#intLit"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uuid10"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#intLit"),
new RyaType(XMLSchema.INTEGER, "10")), queryEngine);
TestUtils.verify(new RyaStatement(
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uuid10"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns#byteLit"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uuid10"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#byteLit"),
new RyaType(XMLSchema.BYTE, "10")), queryEngine);
TestUtils.verify(new RyaStatement(
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uuid10"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns#doubleLit"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uuid10"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#doubleLit"),
new RyaType(XMLSchema.DOUBLE, "10.0")), queryEngine);
TestUtils.verify(new RyaStatement(
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uuid10"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns#dateLit"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uuid10"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#dateLit"),
new RyaType(XMLSchema.DATETIME, "2011-07-12T06:00:00.000Z")), queryEngine);
TestUtils.verify(new RyaStatement(
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uuid10"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns#stringLit"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uuid10"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#stringLit"),
new RyaType("stringLit")), queryEngine);
TestUtils.verify(new RyaStatement(
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uuid10"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns#uriLit"),
- new RyaURI("http://here/2010/tracked-data-provenance/ns" +
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uuid10"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns#uriLit"),
+ new RyaIRI("http://here/2010/tracked-data-provenance/ns" +
"#objectuuid1")), queryEngine);
TestUtils.verify(new RyaStatement(
- new RyaURI("urn:org.apache.rya/2012/05#rts"),
- new RyaURI("urn:org.apache.rya/2012/05#version"),
+ new RyaIRI("urn:org.apache.rya/2012/05#rts"),
+ new RyaIRI("urn:org.apache.rya/2012/05#version"),
new RyaType("3.0.0")), queryEngine);
}
diff --git a/pig/accumulo.pig/src/main/java/org/apache/rya/accumulo/pig/StatementPatternStorage.java b/pig/accumulo.pig/src/main/java/org/apache/rya/accumulo/pig/StatementPatternStorage.java
index 0837e5c..7c87de7 100644
--- a/pig/accumulo.pig/src/main/java/org/apache/rya/accumulo/pig/StatementPatternStorage.java
+++ b/pig/accumulo.pig/src/main/java/org/apache/rya/accumulo/pig/StatementPatternStorage.java
@@ -41,7 +41,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.query.strategy.ByteRange;
import org.apache.rya.api.query.strategy.TriplePatternStrategy;
@@ -190,8 +190,8 @@
}
protected Map.Entry<TABLE_LAYOUT, Range> createRange(Value s_v, Value p_v, Value o_v) throws IOException {
- RyaURI subject_rya = RdfToRyaConversions.convertResource((Resource) s_v);
- RyaURI predicate_rya = RdfToRyaConversions.convertURI((IRI) p_v);
+ RyaIRI subject_rya = RdfToRyaConversions.convertResource((Resource) s_v);
+ RyaIRI predicate_rya = RdfToRyaConversions.convertIRI((IRI) p_v);
RyaType object_rya = RdfToRyaConversions.convertValue(o_v);
TriplePatternStrategy strategy = ryaContext.retrieveStrategy(subject_rya, predicate_rya, object_rya, null);
if (strategy == null) {
diff --git a/pig/accumulo.pig/src/test/java/org/apache/rya/accumulo/pig/StatementPatternStorageTest.java b/pig/accumulo.pig/src/test/java/org/apache/rya/accumulo/pig/StatementPatternStorageTest.java
index eb40df9..942510b 100644
--- a/pig/accumulo.pig/src/test/java/org/apache/rya/accumulo/pig/StatementPatternStorageTest.java
+++ b/pig/accumulo.pig/src/test/java/org/apache/rya/accumulo/pig/StatementPatternStorageTest.java
@@ -43,7 +43,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import junit.framework.TestCase;
@@ -98,9 +98,9 @@
}
public void testSimplePredicateRange() throws Exception {
- ryaDAO.add(new RyaStatement(new RyaURI(namespace, "a"),new RyaURI(namespace,"p"), new RyaType("l")));
- ryaDAO.add(new RyaStatement(new RyaURI(namespace, "b"), new RyaURI(namespace, "p"), new RyaType("l")));
- ryaDAO.add(new RyaStatement(new RyaURI(namespace, "c"), new RyaURI(namespace, "n"), new RyaType("l")));
+ ryaDAO.add(new RyaStatement(new RyaIRI(namespace, "a"),new RyaIRI(namespace,"p"), new RyaType("l")));
+ ryaDAO.add(new RyaStatement(new RyaIRI(namespace, "b"), new RyaIRI(namespace, "p"), new RyaType("l")));
+ ryaDAO.add(new RyaStatement(new RyaIRI(namespace, "c"), new RyaIRI(namespace, "n"), new RyaType("l")));
int count = 0;
@@ -119,8 +119,8 @@
}
public void testContext() throws Exception {
- ryaDAO.add(new RyaStatement(new RyaURI(namespace, "a"), new RyaURI(namespace, "p"), new RyaType("l1")));
- ryaDAO.add(new RyaStatement(new RyaURI(namespace, "a"), new RyaURI(namespace, "p"), new RyaType("l2"), new RyaURI(namespace, "g1")));
+ ryaDAO.add(new RyaStatement(new RyaIRI(namespace, "a"), new RyaIRI(namespace, "p"), new RyaType("l1")));
+ ryaDAO.add(new RyaStatement(new RyaIRI(namespace, "a"), new RyaIRI(namespace, "p"), new RyaType("l2"), new RyaIRI(namespace, "g1")));
int count = 0;
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/RdfCloudTripleStoreConnection.java b/sail/src/main/java/org/apache/rya/rdftriplestore/RdfCloudTripleStoreConnection.java
index e582321..ae97fd8 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/RdfCloudTripleStoreConnection.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/RdfCloudTripleStoreConnection.java
@@ -34,7 +34,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.RdfCloudTripleStoreConstants;
import org.apache.rya.api.domain.RyaStatement;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.RdfEvalStatsDAO;
import org.apache.rya.api.persist.RyaDAO;
@@ -158,7 +158,7 @@
for (final Resource context : contexts) {
final RyaStatement statement = new RyaStatement(
RdfToRyaConversions.convertResource(subject),
- RdfToRyaConversions.convertURI(predicate),
+ RdfToRyaConversions.convertIRI(predicate),
RdfToRyaConversions.convertValue(object),
RdfToRyaConversions.convertResource(context),
null, new StatementMetadata(), cv);
@@ -168,7 +168,7 @@
} else {
final RyaStatement statement = new RyaStatement(
RdfToRyaConversions.convertResource(subject),
- RdfToRyaConversions.convertURI(predicate),
+ RdfToRyaConversions.convertIRI(predicate),
RdfToRyaConversions.convertValue(object),
null, null, new StatementMetadata(), cv);
@@ -186,7 +186,7 @@
@Override
protected void clearInternal(final Resource... aresource) throws SailException {
try {
- final RyaURI[] graphs = new RyaURI[aresource.length];
+ final RyaIRI[] graphs = new RyaIRI[aresource.length];
for (int i = 0 ; i < graphs.length ; i++){
graphs[i] = RdfToRyaConversions.convertResource(aresource[i]);
}
@@ -565,7 +565,7 @@
}
final RyaStatement statement = new RyaStatement(
RdfToRyaConversions.convertResource(subject),
- RdfToRyaConversions.convertURI(predicate),
+ RdfToRyaConversions.convertIRI(predicate),
RdfToRyaConversions.convertValue(object),
RdfToRyaConversions.convertResource(context));
@@ -574,7 +574,7 @@
} else {
final RyaStatement statement = new RyaStatement(
RdfToRyaConversions.convertResource(subject),
- RdfToRyaConversions.convertURI(predicate),
+ RdfToRyaConversions.convertIRI(predicate),
RdfToRyaConversions.convertValue(object),
null);
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/evaluation/FilterRangeVisitor.java b/sail/src/main/java/org/apache/rya/rdftriplestore/evaluation/FilterRangeVisitor.java
index 6b049b9..e6abb09 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/evaluation/FilterRangeVisitor.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/evaluation/FilterRangeVisitor.java
@@ -25,7 +25,7 @@
import java.util.Map;
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
-import org.apache.rya.api.domain.RangeURI;
+import org.apache.rya.api.domain.RangeIRI;
import org.apache.rya.api.domain.RangeValue;
import org.eclipse.rdf4j.model.Value;
import org.eclipse.rdf4j.model.impl.BooleanLiteral;
@@ -87,10 +87,10 @@
final Var objVar = node.getObjectVar();
final RangeValue objRange = rangeValues.get(objVar);
if(subjRange != null) {
- subjectVar.setValue(new RangeURI(subjRange));//Assumes no blank nodes can be ranges
+ subjectVar.setValue(new RangeIRI(subjRange));//Assumes no blank nodes can be ranges
}
if(predRange != null) {
- predVar.setValue(new RangeURI(predRange));
+ predVar.setValue(new RangeIRI(predRange));
}
if(objRange != null) {
objVar.setValue(objRange);
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/HasValueVisitor.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/HasValueVisitor.java
index 0bcbc6b..974f4df 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/HasValueVisitor.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/HasValueVisitor.java
@@ -94,8 +94,8 @@
// { ?var rdf:type :Restriction } and { ?var :property ?value }
// Both require defined predicate
if (predVar != null && predVar.getValue() != null) {
- final IRI predURI = (IRI) predVar.getValue();
- if (RDF.TYPE.equals(predURI) && objVar != null && objVar.getValue() != null
+ final IRI predIRI = (IRI) predVar.getValue();
+ if (RDF.TYPE.equals(predIRI) && objVar != null && objVar.getValue() != null
&& objVar.getValue() instanceof Resource) {
// If the predicate is rdf:type and the type is specified, check whether it can be
// inferred using any hasValue restriction(s)
@@ -119,7 +119,7 @@
else {
// If the predicate has some hasValue restriction associated with it, then finding
// that the object belongs to the appropriate type implies a value.
- final Map<Resource, Set<Value>> impliedValues = inferenceEngine.getHasValueByProperty(predURI);
+ final Map<Resource, Set<Value>> impliedValues = inferenceEngine.getHasValueByProperty(predIRI);
if (impliedValues.size() > 0) {
final Var rdfTypeVar = new Var(RDF.TYPE.stringValue(), RDF.TYPE);
final Var typeVar = new Var("t-" + UUID.randomUUID());
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java
index ada151a..9da1c4a 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InferenceEngine.java
@@ -358,7 +358,7 @@
null, conf);
String integerValue = "";
Value anonPropNode = null;
- Value propURI = null;
+ Value propIRI = null;
if (iter2 != null){
while (iter2.hasNext()){
final Statement iter2Statement = iter2.next();
@@ -381,17 +381,17 @@
null, conf);
while (iter2.hasNext()){
final Statement iter2Statement = iter2.next();
- propURI = iter2Statement.getObject();
+ propIRI = iter2Statement.getObject();
break;
}
iter2.close();
}
}
- if (!integerValue.isEmpty() && propURI!=null) {
+ if (!integerValue.isEmpty() && propIRI!=null) {
try {
final int indexValue = Integer.parseInt(integerValue);
- final IRI chainPropURI = VF.createIRI(propURI.stringValue());
- orderedProperties.put(indexValue, chainPropURI);
+ final IRI chainPropIRI = VF.createIRI(propIRI.stringValue());
+ orderedProperties.put(indexValue, chainPropIRI);
}
catch (final Exception e){
log.error("Error adding chain property to ordered properties", e);
@@ -440,7 +440,7 @@
if (iter2.hasNext()){
iter2Statement = iter2.next();
if (iter2Statement.getObject() instanceof IRI){
- properties.add(new InverseURI((IRI)iter2Statement.getObject()));
+ properties.add(new InverseIRI((IRI)iter2Statement.getObject()));
}
}
}
@@ -918,7 +918,7 @@
* have this property are also assumed to have the property.
*
* @param type
- * The type (URI or bnode) to check against the known
+ * The type (IRI or bnode) to check against the known
* restrictions
* @return For each relevant property, a set of values such that whenever a
* resource has that value for that property, it is implied to
@@ -1407,7 +1407,7 @@
* one is considered individually sufficient: if a resource has the property and the value, then
* it belongs to the provided type. Takes type hierarchy into account, so the value may imply a
* subtype which in turn implies the provided type.
- * @param type The type (URI or bnode) to check against the known restrictions
+ * @param type The type (IRI or bnode) to check against the known restrictions
* @return For each relevant property, a set of values such that whenever a resource has that
* value for that property, it is implied to belong to the type.
*/
@@ -1597,7 +1597,7 @@
* restrictions on those properties could imply this type. A type can have
* multiple intersections and each intersection is a set of types so a list
* of all the type sets is returned.
- * @param type The type (URI or bnode) to check against the known
+ * @param type The type (IRI or bnode) to check against the known
* intersections.
* @return A {@link List} of {@link Resource} type {@link Set}s that
* represents all the known intersections that imply the specified type.
@@ -1616,7 +1616,7 @@
* For a given type, return all sets of types such that owl:oneOf
* restrictions on those properties could imply this type. A enumeration
* of all the types that are part of the specified class type.
- * @param type The type (URI or bnode) to check against the known oneOf
+ * @param type The type (IRI or bnode) to check against the known oneOf
* sets.
* @return A {@link Set} of {@link Resource} types that represents the
* enumeration of resources that belong to the class type.
@@ -1636,7 +1636,7 @@
/**
* Checks if the specified type is an enumerated type.
- * @param type The type (URI or bnode) to check against the known oneOf
+ * @param type The type (IRI or bnode) to check against the known oneOf
* sets.
* @return {@code true} if the type is an enumerated type. {@code false}
* otherwise.
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseURI.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseIRI.java
similarity index 89%
rename from sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseURI.java
rename to sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseIRI.java
index b038604..ff083ff 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseURI.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseIRI.java
@@ -20,12 +20,12 @@
import org.eclipse.rdf4j.model.IRI;
-public class InverseURI implements IRI {
+public class InverseIRI implements IRI {
private static final long serialVersionUID = 1L;
private final IRI impl;
- public InverseURI(final IRI iri) {
+ public InverseIRI(final IRI iri) {
this.impl = iri;
}
@@ -39,8 +39,8 @@
@Override
public boolean equals(final Object obj) {
- if (obj instanceof InverseURI){
- return impl.equals(((InverseURI) obj).impl);
+ if (obj instanceof InverseIRI){
+ return impl.equals(((InverseIRI) obj).impl);
}
return false;
}
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseOfVisitor.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseOfVisitor.java
index e3a74d5..534d9e5 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseOfVisitor.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/InverseOfVisitor.java
@@ -63,13 +63,13 @@
" { ?b ?pred ?a }
*/
- IRI predUri = (IRI) predVar.getValue();
- IRI invPropUri = inferenceEngine.findInverseOf(predUri);
- if (invPropUri != null) {
+ IRI predIri = (IRI) predVar.getValue();
+ IRI invPropIri = inferenceEngine.findInverseOf(predIri);
+ if (invPropIri != null) {
Var subjVar = sp.getSubjectVar();
Union union = new InferUnion();
union.setLeftArg(sp);
- union.setRightArg(new StatementPattern(objVar, new Var(predVar.getName(), invPropUri), subjVar, cntxtVar));
+ union.setRightArg(new StatementPattern(objVar, new Var(predVar.getName(), invPropIri), subjVar, cntxtVar));
node.replaceWith(union);
}
}
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/PropertyChainVisitor.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/PropertyChainVisitor.java
index 2df3461..3a5a76c 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/PropertyChainVisitor.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/PropertyChainVisitor.java
@@ -62,8 +62,8 @@
!RDFS.NAMESPACE.equals(predNamespace)
&& !EXPANDED.equals(cntxtVar)) {
- final IRI chainPropURI = (IRI) predVar.getValue();
- final List<IRI> chain = inferenceEngine.getPropertyChain(chainPropURI);
+ final IRI chainPropIRI = (IRI) predVar.getValue();
+ final List<IRI> chain = inferenceEngine.getPropertyChain(chainPropIRI);
final List<StatementPattern> expandedPatterns = new ArrayList<StatementPattern>();
if (chain.size() > 0) {
final Var originalSubj = sp.getSubjectVar();
@@ -75,7 +75,7 @@
final String s = UUID.randomUUID().toString();
final Var currentObj = new Var("c-" + s);
StatementPattern statementPattern = new StatementPattern(nextSubj, new Var(chainElement.stringValue()), currentObj, sp.getContextVar());
- if (chainElement instanceof InverseURI){
+ if (chainElement instanceof InverseIRI){
statementPattern = new StatementPattern(currentObj, new Var(chainElement.stringValue()), nextSubj, sp.getContextVar());
}
expandedPatterns.add(statementPattern);
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SubClassOfVisitor.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SubClassOfVisitor.java
index 0d11918..31b7792 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SubClassOfVisitor.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SubClassOfVisitor.java
@@ -61,15 +61,15 @@
// join.getProperties().put(InferConstants.INFERRED, InferConstants.TRUE);
// node.replaceWith(join);
- final IRI subclassof_uri = (IRI) objVar.getValue();
- final Collection<IRI> parents = InferenceEngine.findParents(inferenceEngine.getSubClassOfGraph(), subclassof_uri);
+ final IRI subclassof_iri = (IRI) objVar.getValue();
+ final Collection<IRI> parents = InferenceEngine.findParents(inferenceEngine.getSubClassOfGraph(), subclassof_iri);
if (parents != null && parents.size() > 0) {
final String s = UUID.randomUUID().toString();
final Var typeVar = new Var(s);
final FixedStatementPattern fsp = new FixedStatementPattern(typeVar, new Var("c-" + s, RDFS.SUBCLASSOF), objVar, conVar);
- parents.add(subclassof_uri);
- for (final IRI u : parents) {
- fsp.statements.add(new NullableStatementImpl(u, RDFS.SUBCLASSOF, subclassof_uri));
+ parents.add(subclassof_iri);
+ for (final IRI iri : parents) {
+ fsp.statements.add(new NullableStatementImpl(iri, RDFS.SUBCLASSOF, subclassof_iri));
}
final StatementPattern rdfType = new DoNotExpandSP(sp.getSubjectVar(), sp.getPredicateVar(), typeVar, conVar);
@@ -82,8 +82,8 @@
// StatementPatterns statementPatterns = new StatementPatterns();
// statementPatterns.patterns.add(node);
// Var subjVar = node.getSubjectVar();
-// for (URI u : parents) {
-// statementPatterns.patterns.add(new StatementPattern(subjVar, predVar, new Var(objVar.getName(), u)));
+// for (IRI iri : parents) {
+// statementPatterns.patterns.add(new StatementPattern(subjVar, predVar, new Var(objVar.getName(), iri)));
// }
// node.replaceWith(statementPatterns);
// }
@@ -92,8 +92,8 @@
// VarCollection vc = new VarCollection();
// vc.setName(objVar.getName());
// vc.values.add(objVar);
-// for (URI u : parents) {
-// vc.values.add(new Var(objVar.getName(), u));
+// for (IRI iri : parents) {
+// vc.values.add(new Var(objVar.getName(), iri));
// }
// Var subjVar = node.getSubjectVar();
// node.replaceWith(new StatementPattern(subjVar, predVar, vc, node.getContextVar()));
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SubPropertyOfVisitor.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SubPropertyOfVisitor.java
index 102c0b2..e49e605 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SubPropertyOfVisitor.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SubPropertyOfVisitor.java
@@ -78,8 +78,8 @@
// StatementPatterns statementPatterns = new StatementPatterns();
// statementPatterns.patterns.add(node);
// Var subjVar = node.getSubjectVar();
-// for (URI u : parents) {
-// statementPatterns.patterns.add(new StatementPattern(subjVar, new Var(predVar.getName(), u), objVar));
+// for (IRI iri : parents) {
+// statementPatterns.patterns.add(new StatementPattern(subjVar, new Var(predVar.getName(), iri), objVar));
// }
// node.replaceWith(statementPatterns);
// }
@@ -87,24 +87,24 @@
// VarCollection vc = new VarCollection();
// vc.setName(predVar.getName());
// vc.values.add(predVar);
-// for (URI u : parents) {
-// vc.values.add(new Var(predVar.getName(), u));
+// for (IRI iri : parents) {
+// vc.values.add(new Var(predVar.getName(), iri));
// }
// Var subjVar = node.getSubjectVar();
// node.replaceWith(new StatementPattern(subjVar, vc, objVar, node.getContextVar()));
// }
- final IRI subprop_uri = (IRI) predVar.getValue();
- final Set<IRI> parents = InferenceEngine.findParents(inferenceEngine.getSubPropertyOfGraph(), subprop_uri);
+ final IRI subprop_iri = (IRI) predVar.getValue();
+ final Set<IRI> parents = InferenceEngine.findParents(inferenceEngine.getSubPropertyOfGraph(), subprop_iri);
if (parents != null && parents.size() > 0) {
final String s = UUID.randomUUID().toString();
final Var typeVar = new Var(s);
final FixedStatementPattern fsp = new FixedStatementPattern(typeVar, new Var("c-" + s, RDFS.SUBPROPERTYOF), predVar, cntxtVar);
// fsp.statements.add(new NullableStatementImpl(subprop_uri, RDFS.SUBPROPERTYOF, subprop_uri));
//add self
- parents.add(subprop_uri);
+ parents.add(subprop_iri);
for (final IRI u : parents) {
- fsp.statements.add(new NullableStatementImpl(u, RDFS.SUBPROPERTYOF, subprop_uri));
+ fsp.statements.add(new NullableStatementImpl(u, RDFS.SUBPROPERTYOF, subprop_iri));
}
final StatementPattern rdfType = new DoNotExpandSP(sp.getSubjectVar(), typeVar, sp.getObjectVar(), cntxtVar);
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SymmetricPropertyVisitor.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SymmetricPropertyVisitor.java
index c8e1a7d..72a3dae 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SymmetricPropertyVisitor.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/SymmetricPropertyVisitor.java
@@ -63,8 +63,8 @@
" { ?b ?pred ?a }
*/
- IRI symmPropUri = (IRI) predVar.getValue();
- if(inferenceEngine.isSymmetricProperty(symmPropUri)) {
+ IRI symmPropIri = (IRI) predVar.getValue();
+ if(inferenceEngine.isSymmetricProperty(symmPropIri)) {
Var subjVar = sp.getSubjectVar();
Union union = new InferUnion();
union.setLeftArg(sp);
diff --git a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/TransitivePropertyVisitor.java b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/TransitivePropertyVisitor.java
index 666bbd8..bae1bd1 100644
--- a/sail/src/main/java/org/apache/rya/rdftriplestore/inference/TransitivePropertyVisitor.java
+++ b/sail/src/main/java/org/apache/rya/rdftriplestore/inference/TransitivePropertyVisitor.java
@@ -56,8 +56,8 @@
!RDFS.NAMESPACE.equals(predNamespace)
&& !EXPANDED.equals(cntxtVar)) {
- final IRI transPropUri = (IRI) predVar.getValue();
- if (inferenceEngine.isTransitiveProperty(transPropUri)) {
+ final IRI transPropIri = (IRI) predVar.getValue();
+ if (inferenceEngine.isTransitiveProperty(transPropIri)) {
node.replaceWith(new TransitivePropertySP(sp.getSubjectVar(), sp.getPredicateVar(), sp.getObjectVar(), sp.getContextVar()));
}
}
diff --git a/sail/src/test/java/org/apache/rya/HashJoinTest.java b/sail/src/test/java/org/apache/rya/HashJoinTest.java
index e0463c9..8fc2590 100644
--- a/sail/src/test/java/org/apache/rya/HashJoinTest.java
+++ b/sail/src/test/java/org/apache/rya/HashJoinTest.java
@@ -33,7 +33,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.join.HashJoin;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
@@ -68,13 +68,13 @@
@Test
public void testSimpleJoin() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -88,11 +88,11 @@
//1 join
HashJoin hjoin = new HashJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = hjoin.join(null,
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two));
+ CloseableIteration<RyaIRI, RyaDAOException> join = hjoin.join(null,
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two));
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -106,15 +106,15 @@
@Test
public void testSimpleJoinMultiWay() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -136,14 +136,14 @@
//1 join
HashJoin hjoin = new HashJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = hjoin.join(null,
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, three),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = hjoin.join(null,
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, three),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, four)
);
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -157,16 +157,16 @@
@Test
public void testMergeJoinMultiWay() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -188,14 +188,14 @@
//1 join
HashJoin hjoin = new HashJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = hjoin.join(null,
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, three),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = hjoin.join(null,
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, three),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, four)
);
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -208,16 +208,16 @@
@Test
public void testMergeJoinMultiWayNone() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, three));
@@ -234,11 +234,11 @@
//1 join
HashJoin hjoin = new HashJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = hjoin.join(null,
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, three),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = hjoin.join(null,
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, three),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, four)
);
assertFalse(join.hasNext());
@@ -248,16 +248,16 @@
@Test
public void testMergeJoinMultiWayNone2() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, four));
@@ -272,11 +272,11 @@
//1 join
HashJoin hjoin = new HashJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = hjoin.join(null,
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, three),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = hjoin.join(null,
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, three),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, four)
);
assertFalse(join.hasNext());
@@ -286,13 +286,13 @@
@Test
public void testSimpleHashJoinPredicateOnly() throws Exception {
//add data
- RyaURI pred1 = new RyaURI(litdupsNS, "pred1");
- RyaURI pred2 = new RyaURI(litdupsNS, "pred2");
+ RyaIRI pred1 = new RyaIRI(litdupsNS, "pred1");
+ RyaIRI pred2 = new RyaIRI(litdupsNS, "pred2");
RyaType one = new RyaType("1");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred1, one));
dao.add(new RyaStatement(subj1, pred2, one));
@@ -320,15 +320,15 @@
@Test
public void testSimpleMergeJoinPredicateOnly2() throws Exception {
//add data
- RyaURI pred1 = new RyaURI(litdupsNS, "pred1");
- RyaURI pred2 = new RyaURI(litdupsNS, "pred2");
+ RyaIRI pred1 = new RyaIRI(litdupsNS, "pred1");
+ RyaIRI pred2 = new RyaIRI(litdupsNS, "pred2");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred1, one));
dao.add(new RyaStatement(subj1, pred1, two));
diff --git a/sail/src/test/java/org/apache/rya/IterativeJoinTest.java b/sail/src/test/java/org/apache/rya/IterativeJoinTest.java
index 8e40e2d..6612f9e 100644
--- a/sail/src/test/java/org/apache/rya/IterativeJoinTest.java
+++ b/sail/src/test/java/org/apache/rya/IterativeJoinTest.java
@@ -33,7 +33,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.join.IterativeJoin;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
@@ -68,13 +68,13 @@
@Test
public void testSimpleIterativeJoin() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -87,10 +87,10 @@
//1 join
IterativeJoin iterJoin = new IterativeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = iterJoin.join(null, new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two));
+ CloseableIteration<RyaIRI, RyaDAOException> join = iterJoin.join(null, new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two));
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -104,15 +104,15 @@
@Test
public void testSimpleIterativeJoinMultiWay() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -133,14 +133,14 @@
//1 join
IterativeJoin iterativeJoin = new IterativeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = iterativeJoin.join(null,
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, three),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = iterativeJoin.join(null,
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, three),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, four)
);
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -154,16 +154,16 @@
@Test
public void testIterativeJoinMultiWay() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -184,14 +184,14 @@
//1 join
IterativeJoin iterativeJoin = new IterativeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = iterativeJoin.join(null,
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, three),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = iterativeJoin.join(null,
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, three),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, four)
);
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -204,16 +204,16 @@
@Test
public void testIterativeJoinMultiWayNone() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, three));
@@ -229,11 +229,11 @@
//1 join
IterativeJoin iterativeJoin = new IterativeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = iterativeJoin.join(null,
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, three),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = iterativeJoin.join(null,
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, three),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, four)
);
assertFalse(join.hasNext());
@@ -243,16 +243,16 @@
@Test
public void testIterativeJoinMultiWayNone2() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, four));
@@ -266,10 +266,10 @@
//1 join
IterativeJoin iterativeJoin = new IterativeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = iterativeJoin.join(null, new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, one),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, two),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, three),
- new RdfCloudTripleStoreUtils.CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = iterativeJoin.join(null, new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, one),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, two),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, three),
+ new RdfCloudTripleStoreUtils.CustomEntry<RyaIRI, RyaType>(pred, four)
);
assertFalse(join.hasNext());
@@ -279,13 +279,13 @@
@Test
public void testSimpleIterativeJoinPredicateOnly() throws Exception {
//add data
- RyaURI pred1 = new RyaURI(litdupsNS, "pred1");
- RyaURI pred2 = new RyaURI(litdupsNS, "pred2");
+ RyaIRI pred1 = new RyaIRI(litdupsNS, "pred1");
+ RyaIRI pred2 = new RyaIRI(litdupsNS, "pred2");
RyaType one = new RyaType("1");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred1, one));
dao.add(new RyaStatement(subj1, pred2, one));
@@ -313,15 +313,15 @@
@Test
public void testSimpleIterativeJoinPredicateOnly2() throws Exception {
//add data
- RyaURI pred1 = new RyaURI(litdupsNS, "pred1");
- RyaURI pred2 = new RyaURI(litdupsNS, "pred2");
+ RyaIRI pred1 = new RyaIRI(litdupsNS, "pred1");
+ RyaIRI pred2 = new RyaIRI(litdupsNS, "pred2");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred1, one));
dao.add(new RyaStatement(subj1, pred1, two));
diff --git a/sail/src/test/java/org/apache/rya/MergeJoinTest.java b/sail/src/test/java/org/apache/rya/MergeJoinTest.java
index efc44c3..c06b777 100644
--- a/sail/src/test/java/org/apache/rya/MergeJoinTest.java
+++ b/sail/src/test/java/org/apache/rya/MergeJoinTest.java
@@ -33,7 +33,7 @@
import org.apache.rya.api.RdfCloudTripleStoreUtils.CustomEntry;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.api.persist.query.join.MergeJoin;
import org.eclipse.rdf4j.common.iteration.CloseableIteration;
@@ -71,13 +71,13 @@
@Test
public void testSimpleMergeJoin() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -91,10 +91,10 @@
//1 join
MergeJoin mergeJoin = new MergeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaURI, RyaType>(pred, one),
- new CustomEntry<RyaURI, RyaType>(pred, two));
+ CloseableIteration<RyaIRI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaIRI, RyaType>(pred, one),
+ new CustomEntry<RyaIRI, RyaType>(pred, two));
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -108,13 +108,13 @@
@Test
public void testSimpleMergeJoinPredicateOnly() throws Exception {
//add data
- RyaURI pred1 = new RyaURI(litdupsNS, "pred1");
- RyaURI pred2 = new RyaURI(litdupsNS, "pred2");
+ RyaIRI pred1 = new RyaIRI(litdupsNS, "pred1");
+ RyaIRI pred2 = new RyaIRI(litdupsNS, "pred2");
RyaType one = new RyaType("1");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred1, one));
dao.add(new RyaStatement(subj1, pred2, one));
@@ -142,15 +142,15 @@
@Test
public void testSimpleMergeJoinPredicateOnly2() throws Exception {
//add data
- RyaURI pred1 = new RyaURI(litdupsNS, "pred1");
- RyaURI pred2 = new RyaURI(litdupsNS, "pred2");
+ RyaIRI pred1 = new RyaIRI(litdupsNS, "pred1");
+ RyaIRI pred2 = new RyaIRI(litdupsNS, "pred2");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred1, one));
dao.add(new RyaStatement(subj1, pred1, two));
@@ -194,15 +194,15 @@
@Test
public void testSimpleMergeJoinMultiWay() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -224,13 +224,13 @@
//1 join
MergeJoin mergeJoin = new MergeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaURI, RyaType>(pred, one),
- new CustomEntry<RyaURI, RyaType>(pred, two),
- new CustomEntry<RyaURI, RyaType>(pred, three),
- new CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaIRI, RyaType>(pred, one),
+ new CustomEntry<RyaIRI, RyaType>(pred, two),
+ new CustomEntry<RyaIRI, RyaType>(pred, three),
+ new CustomEntry<RyaIRI, RyaType>(pred, four)
);
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -244,16 +244,16 @@
@Test
public void testMergeJoinMultiWay() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, two));
@@ -275,13 +275,13 @@
//1 join
MergeJoin mergeJoin = new MergeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaURI, RyaType>(pred, one),
- new CustomEntry<RyaURI, RyaType>(pred, two),
- new CustomEntry<RyaURI, RyaType>(pred, three),
- new CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaIRI, RyaType>(pred, one),
+ new CustomEntry<RyaIRI, RyaType>(pred, two),
+ new CustomEntry<RyaIRI, RyaType>(pred, three),
+ new CustomEntry<RyaIRI, RyaType>(pred, four)
);
- Set<RyaURI> uris = new HashSet<RyaURI>();
+ Set<RyaIRI> uris = new HashSet<RyaIRI>();
while (join.hasNext()) {
uris.add(join.next());
}
@@ -294,16 +294,16 @@
@Test
public void testMergeJoinMultiWayNone() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, three));
@@ -320,10 +320,10 @@
//1 join
MergeJoin mergeJoin = new MergeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaURI, RyaType>(pred, one),
- new CustomEntry<RyaURI, RyaType>(pred, two),
- new CustomEntry<RyaURI, RyaType>(pred, three),
- new CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaIRI, RyaType>(pred, one),
+ new CustomEntry<RyaIRI, RyaType>(pred, two),
+ new CustomEntry<RyaIRI, RyaType>(pred, three),
+ new CustomEntry<RyaIRI, RyaType>(pred, four)
);
assertFalse(join.hasNext());
@@ -333,16 +333,16 @@
@Test
public void testMergeJoinMultiWayNone2() throws Exception {
//add data
- RyaURI pred = new RyaURI(litdupsNS, "pred1");
+ RyaIRI pred = new RyaIRI(litdupsNS, "pred1");
RyaType zero = new RyaType("0");
RyaType one = new RyaType("1");
RyaType two = new RyaType("2");
RyaType three = new RyaType("3");
RyaType four = new RyaType("4");
- RyaURI subj1 = new RyaURI(litdupsNS, "subj1");
- RyaURI subj2 = new RyaURI(litdupsNS, "subj2");
- RyaURI subj3 = new RyaURI(litdupsNS, "subj3");
- RyaURI subj4 = new RyaURI(litdupsNS, "subj4");
+ RyaIRI subj1 = new RyaIRI(litdupsNS, "subj1");
+ RyaIRI subj2 = new RyaIRI(litdupsNS, "subj2");
+ RyaIRI subj3 = new RyaIRI(litdupsNS, "subj3");
+ RyaIRI subj4 = new RyaIRI(litdupsNS, "subj4");
dao.add(new RyaStatement(subj1, pred, one));
dao.add(new RyaStatement(subj1, pred, four));
@@ -357,10 +357,10 @@
//1 join
MergeJoin mergeJoin = new MergeJoin(dao.getQueryEngine());
- CloseableIteration<RyaURI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaURI, RyaType>(pred, one),
- new CustomEntry<RyaURI, RyaType>(pred, two),
- new CustomEntry<RyaURI, RyaType>(pred, three),
- new CustomEntry<RyaURI, RyaType>(pred, four)
+ CloseableIteration<RyaIRI, RyaDAOException> join = mergeJoin.join(null, new CustomEntry<RyaIRI, RyaType>(pred, one),
+ new CustomEntry<RyaIRI, RyaType>(pred, two),
+ new CustomEntry<RyaIRI, RyaType>(pred, three),
+ new CustomEntry<RyaIRI, RyaType>(pred, four)
);
assertFalse(join.hasNext());
diff --git a/sail/src/test/java/org/apache/rya/rdftriplestore/evaluation/StatementPatternEvalTest.java b/sail/src/test/java/org/apache/rya/rdftriplestore/evaluation/StatementPatternEvalTest.java
index f40b4e9..c9ed744 100644
--- a/sail/src/test/java/org/apache/rya/rdftriplestore/evaluation/StatementPatternEvalTest.java
+++ b/sail/src/test/java/org/apache/rya/rdftriplestore/evaluation/StatementPatternEvalTest.java
@@ -33,7 +33,7 @@
import org.apache.rya.api.RdfCloudTripleStoreConfiguration;
import org.apache.rya.api.domain.RyaStatement;
import org.apache.rya.api.domain.RyaType;
-import org.apache.rya.api.domain.RyaURI;
+import org.apache.rya.api.domain.RyaIRI;
import org.apache.rya.api.domain.StatementMetadata;
import org.apache.rya.api.persist.RyaDAOException;
import org.apache.rya.rdftriplestore.RdfCloudTripleStoreConnection.StoreTripleSource;
@@ -86,16 +86,16 @@
ParsedQuery pq = parser.parseQuery(query, null);
List<StatementPattern> spList = StatementPatternCollector.process(pq.getTupleExpr());
- RyaStatement statement1 = new RyaStatement(new RyaURI("uri:Joe"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context1"), "", new StatementMetadata());
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("uri:Joe"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context1"), "", new StatementMetadata());
dao.add(statement1);
- RyaStatement statement2 = new RyaStatement(new RyaURI("uri:Doug"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context2"), "", new StatementMetadata());
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("uri:Doug"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context2"), "", new StatementMetadata());
dao.add(statement2);
- RyaStatement statement3 = new RyaStatement(new RyaURI("uri:Eric"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context3"), "", new StatementMetadata());
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("uri:Eric"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context3"), "", new StatementMetadata());
dao.add(statement3);
QueryBindingSet bsConstraint1 = new QueryBindingSet();
@@ -137,16 +137,16 @@
ParsedQuery pq = parser.parseQuery(query, null);
List<StatementPattern> spList = StatementPatternCollector.process(pq.getTupleExpr());
- RyaStatement statement1 = new RyaStatement(new RyaURI("uri:Joe"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context1"), "", new StatementMetadata());
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("uri:Joe"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context1"), "", new StatementMetadata());
dao.add(statement1);
- RyaStatement statement2 = new RyaStatement(new RyaURI("uri:Doug"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context2"), "", new StatementMetadata());
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("uri:Doug"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context2"), "", new StatementMetadata());
dao.add(statement2);
- RyaStatement statement3 = new RyaStatement(new RyaURI("uri:Eric"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context3"), "", new StatementMetadata());
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("uri:Eric"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context3"), "", new StatementMetadata());
dao.add(statement3);
QueryBindingSet bsConstraint1 = new QueryBindingSet();
@@ -191,16 +191,16 @@
ParsedQuery pq = parser.parseQuery(query, null);
List<StatementPattern> spList = StatementPatternCollector.process(pq.getTupleExpr());
- RyaStatement statement1 = new RyaStatement(new RyaURI("uri:Joe"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context1"), "", new StatementMetadata());
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("uri:Joe"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context1"), "", new StatementMetadata());
dao.add(statement1);
- RyaStatement statement2 = new RyaStatement(new RyaURI("uri:Doug"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context2"), "", new StatementMetadata());
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("uri:Doug"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context2"), "", new StatementMetadata());
dao.add(statement2);
- RyaStatement statement3 = new RyaStatement(new RyaURI("uri:Eric"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context3"), "", new StatementMetadata());
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("uri:Eric"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context3"), "", new StatementMetadata());
dao.add(statement3);
QueryBindingSet bsConstraint1 = new QueryBindingSet();
@@ -237,16 +237,16 @@
ParsedQuery pq = parser.parseQuery(query, null);
List<StatementPattern> spList = StatementPatternCollector.process(pq.getTupleExpr());
- RyaStatement statement1 = new RyaStatement(new RyaURI("uri:Joe"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context1"), "", new StatementMetadata());
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("uri:Joe"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context1"), "", new StatementMetadata());
dao.add(statement1);
- RyaStatement statement2 = new RyaStatement(new RyaURI("uri:Doug"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context2"), "", new StatementMetadata());
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("uri:Doug"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context2"), "", new StatementMetadata());
dao.add(statement2);
- RyaStatement statement3 = new RyaStatement(new RyaURI("uri:Eric"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context3"), "", new StatementMetadata());
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("uri:Eric"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context3"), "", new StatementMetadata());
dao.add(statement3);
QueryBindingSet bsConstraint1 = new QueryBindingSet();
@@ -277,16 +277,16 @@
ParsedQuery pq = parser.parseQuery(query, null);
List<StatementPattern> spList = StatementPatternCollector.process(pq.getTupleExpr());
- RyaStatement statement1 = new RyaStatement(new RyaURI("uri:Joe"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context1"), "", new StatementMetadata());
+ RyaStatement statement1 = new RyaStatement(new RyaIRI("uri:Joe"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context1"), "", new StatementMetadata());
dao.add(statement1);
- RyaStatement statement2 = new RyaStatement(new RyaURI("uri:Doug"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context1"), "", new StatementMetadata());
+ RyaStatement statement2 = new RyaStatement(new RyaIRI("uri:Doug"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context1"), "", new StatementMetadata());
dao.add(statement2);
- RyaStatement statement3 = new RyaStatement(new RyaURI("uri:Doug"), new RyaURI("uri:talksTo"),
- new RyaType("uri:Bob"), new RyaURI("uri:context2"), "", new StatementMetadata());
+ RyaStatement statement3 = new RyaStatement(new RyaIRI("uri:Doug"), new RyaIRI("uri:talksTo"),
+ new RyaType("uri:Bob"), new RyaIRI("uri:context2"), "", new StatementMetadata());
dao.add(statement3);
QueryBindingSet bsConstraint1 = new QueryBindingSet();
diff --git a/sail/src/test/java/org/apache/rya/rdftriplestore/inference/PropertyChainTest.java b/sail/src/test/java/org/apache/rya/rdftriplestore/inference/PropertyChainTest.java
index a3fd6ce..7a6bc79 100644
--- a/sail/src/test/java/org/apache/rya/rdftriplestore/inference/PropertyChainTest.java
+++ b/sail/src/test/java/org/apache/rya/rdftriplestore/inference/PropertyChainTest.java
@@ -115,7 +115,7 @@
inferenceEngine.refreshGraph();
List<IRI> chain = inferenceEngine.getPropertyChain(VF.createIRI("urn:greatMother"));
Assert.assertEquals(chain.size(), 2);
- Assert.assertEquals(chain.get(0), new InverseURI(VF.createIRI("urn:isChildOf")));
+ Assert.assertEquals(chain.get(0), new InverseIRI(VF.createIRI("urn:isChildOf")));
Assert.assertEquals(chain.get(1), VF.createIRI("urn:MotherOf"));
}