Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
*/
package org.apache.rya.api.client;

import java.io.Closeable;

import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
import edu.umd.cs.findbugs.annotations.NonNull;
import org.eclipse.rdf4j.query.BindingSet;
import org.eclipse.rdf4j.query.TupleQueryResult;

import edu.umd.cs.findbugs.annotations.DefaultAnnotation;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.Closeable;

/**
* Loads a SPARQL Query and executes the query against an instance of Rya.
Expand All @@ -41,5 +40,6 @@ public interface ExecuteSparqlQuery extends Closeable {
* @throws InstanceDoesNotExistException No instance of Rya exists for the provided name.
* @throws RyaClientException Something caused the command to fail.
*/
public TupleQueryResult executeSparqlQuery(String ryaInstanceName, String sparqlQuery) throws InstanceDoesNotExistException, RyaClientException;
TupleQueryResult executeSparqlQuery(String ryaInstanceName, String sparqlQuery) throws InstanceDoesNotExistException, RyaClientException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,23 @@
*/



import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.Resource;

/**
* Created by IntelliJ IDEA.
* Date: 4/11/12
* Time: 1:03 PM
* To change this template use File | Settings | File Templates.
*/
public class RangeIRI extends RangeValue<IRI> implements IRI {
public class RangeIRI extends RangeValue<Resource> implements IRI {

public RangeIRI(IRI start, IRI end) {
public RangeIRI(Resource start, Resource end) {
super(start, end);
}

public RangeIRI(RangeValue rangeValue) {
super((IRI) rangeValue.getStart(), (IRI) rangeValue.getEnd());
public RangeIRI(RangeValue<Resource> rangeValue) {
super(rangeValue.getStart(), rangeValue.getEnd());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* under the License.
*/

import org.apache.rya.api.resolver.RyaToRdfConversions;
import org.eclipse.rdf4j.model.IRI;
import org.eclipse.rdf4j.model.util.URIUtil;
import org.eclipse.rdf4j.model.vocabulary.XMLSchema;
Expand All @@ -28,7 +29,7 @@
* Date: 7/16/12
* Time: 11:56 AM
*/
public class RyaIRI extends RyaType {
public class RyaIRI extends RyaType implements RyaResource, IRI {

public RyaIRI() {
setDataType(XMLSchema.ANYURI);
Expand Down Expand Up @@ -58,4 +59,19 @@ protected void validate(String data) {
URIUtil.getLocalNameIndex(data);
}

@Override
public String getNamespace() {
return RyaToRdfConversions.convertIRI(this).getNamespace();
}

@Override
public String getLocalName() {
return RyaToRdfConversions.convertIRI(this).getLocalName();
}

@Override
public String stringValue() {
return RyaToRdfConversions.convertIRI(this).stringValue();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/


import org.apache.rya.api.resolver.RdfToRyaConversions;
import org.eclipse.rdf4j.model.Resource;

/**
* Date: 7/17/12
Expand All @@ -28,31 +30,35 @@
public class RyaIRIRange extends RyaIRI implements RyaRange {
public static final RyaIRI LAST_IRI = new RyaIRI(((char) 255) + ":#" + ((char) 255));

private RyaIRI start;
private RyaIRI stop;
private RyaResource start;
private RyaResource stop;

public RyaIRIRange() {
super();
}

public RyaIRIRange(RyaIRI start, RyaIRI stop) {
public RyaIRIRange(Resource start, Resource stop) {
this(RdfToRyaConversions.convertResource(start), RdfToRyaConversions.convertResource(stop));
}

public RyaIRIRange(RyaResource start, RyaResource stop) {
this.start = start;
this.stop = stop;
}

public RyaIRI getStart() {
public RyaResource getStart() {
return start;
}

public void setStart(RyaIRI start) {
public void setStart(RyaResource start) {
this.start = start;
}

public RyaIRI getStop() {
public RyaResource getStop() {
return stop;
}

public void setStop(RyaIRI stop) {
public void setStop(RyaResource stop) {
this.stop = stop;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* Time: 10:02 AM
*/
public interface RyaRange {
public RyaType getStart();
RyaValue getStart();

public RyaType getStop();
RyaValue getStop();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.rya.api.domain;

import org.eclipse.rdf4j.model.Resource;

public interface RyaResource extends RyaValue, Resource {
// Empty place holder as common supertype of IRI and BNode
}
Loading