Strabon

changeset 944:e197d4742126

changed StrabonEndpoint interface in strabon-endpoint-client to accommodate the case of storing RDF data in named graphs (addresses bug #28)
author Babis Nikolaou <charnik@di.uoa.gr>
date Thu Mar 28 21:07:05 2013 +0200 (2013-03-28)
parents 802e52d68629
children 2fbf6954f8dc
files endpoint-client/src/main/java/eu/earthobservatory/org/StrabonEndpoint/client/SpatialEndpoint.java endpoint-client/src/main/java/eu/earthobservatory/org/StrabonEndpoint/client/StrabonEndpoint.java
line diff
     1.1 --- a/endpoint-client/src/main/java/eu/earthobservatory/org/StrabonEndpoint/client/SpatialEndpoint.java	Thu Mar 28 12:46:15 2013 +0200
     1.2 +++ b/endpoint-client/src/main/java/eu/earthobservatory/org/StrabonEndpoint/client/SpatialEndpoint.java	Thu Mar 28 21:07:05 2013 +0200
     1.3 @@ -26,10 +26,36 @@
     1.4  
     1.5  	public EndpointResult query(String sparqlQuery, stSPARQLQueryResultFormat format) throws IOException;
     1.6  	
     1.7 -	public boolean store(String data, RDFFormat format);
     1.8 +	/**
     1.9 +	 * Stores the RDF <code>data</code> which are in the RDF format
    1.10 +	 * <code>format</code> in the named graph specified by the URL
    1.11 +	 * <code>namedGraph</code>.
    1.12 +	 * 
    1.13 +	 * @param data 
    1.14 +	 * @param format
    1.15 +	 * @param namedGraph
    1.16 +	 * @return <code>true</code> if store was successful, <code>false</code> otherwise
    1.17 +	 */
    1.18 +	public boolean store(String data, RDFFormat format, URL namedGraph);
    1.19  	
    1.20 -	public boolean store(URL data, RDFFormat format);
    1.21 +	/**
    1.22 +	 * Stores the RDF data located at <code>data</code> which are in the
    1.23 +	 * RDF format <code>format</code> in the named graph specified by the
    1.24 +	 * URL <code>namedGraph</code>.
    1.25 +	 * 
    1.26 +	 * @param data
    1.27 +	 * @param format
    1.28 +	 * @param namedGraph
    1.29 +	 * @return <code>true</code> if store was successful, <code>false</code> otherwise
    1.30 +	 */
    1.31 +	public boolean store(URL data, RDFFormat format, URL namedGraph);
    1.32  	
    1.33 +	/**
    1.34 +	 * Executes the SPARQL Update query specified in <code>sparqlUpdate</code>.
    1.35 +	 * 
    1.36 +	 * @param sparqlUpdate
    1.37 +	 * @return <code>true</code> if store was successful, <code>false</code> otherwise
    1.38 +	 */
    1.39  	public boolean update(String sparqlUpdate);
    1.40  	
    1.41  	public EndpointResult describe(String sparqlDescribe);
     2.1 --- a/endpoint-client/src/main/java/eu/earthobservatory/org/StrabonEndpoint/client/StrabonEndpoint.java	Thu Mar 28 12:46:15 2013 +0200
     2.2 +++ b/endpoint-client/src/main/java/eu/earthobservatory/org/StrabonEndpoint/client/StrabonEndpoint.java	Thu Mar 28 21:07:05 2013 +0200
     2.3 @@ -123,28 +123,28 @@
     2.4  	}
     2.5  
     2.6  	@Override
     2.7 -	public boolean store(String data, RDFFormat format) {
     2.8 -		return false;
     2.9 +	public boolean store(String data, RDFFormat format, URL namedGraph) {
    2.10 +		throw new UnsupportedOperationException();
    2.11  	}
    2.12  
    2.13  	@Override
    2.14 -	public boolean store(URL data, RDFFormat format) {
    2.15 -		return false;
    2.16 +	public boolean store(URL data, RDFFormat format, URL namedGraph) {
    2.17 +		throw new UnsupportedOperationException();
    2.18  	}
    2.19  
    2.20  	@Override
    2.21  	public boolean update(String sparqlUpdate) {
    2.22 -		return false;
    2.23 +		throw new UnsupportedOperationException();
    2.24  	}
    2.25  
    2.26  	@Override
    2.27  	public EndpointResult describe(String sparqlDescribe) {
    2.28 -		return null;
    2.29 +		throw new UnsupportedOperationException();
    2.30  	}
    2.31  
    2.32  	@Override
    2.33  	public EndpointResult construct(String sparqlConstruct) {
    2.34 -		return null;
    2.35 +		throw new UnsupportedOperationException();
    2.36  	}
    2.37  	
    2.38  	public static void main(String args[]) {