Strabon

changeset 472:9ff2cf5e5c7f

further into describe functionality
author pico
date Thu Jul 19 23:57:02 2012 +0300 (2012-07-19)
parents 920ebd41a1a3
children 2bd263a2a9ea
files endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java
line diff
     1.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java	Thu Jul 19 23:30:44 2012 +0300
     1.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java	Thu Jul 19 23:57:02 2012 +0300
     1.3 @@ -217,14 +217,14 @@
     1.4  	
     1.5  	public String describe(String queryString, String answerFormatStrabon)
     1.6  	throws MalformedQueryException, RepositoryException, QueryEvaluationException, TupleQueryResultHandlerException, IOException, ClassNotFoundException {
     1.7 -		logger.info("[StrabonEndpoint] Received SELECT query.");
     1.8 +		logger.info("[StrabonEndpoint] Received DESCRIBE query.");
     1.9  		if ((this.strabon == null) && (!init())) {
    1.10  			throw new RepositoryException("Could not connect to Strabon.");
    1.11  		} 
    1.12  
    1.13 -		ByteArrayOutputStream answer = new ByteArrayOutputStream();
    1.14 +		String answer = null;
    1.15  		
    1.16 -		strabon.query(queryString, Format.fromString(answerFormatStrabon), strabon.getSailRepoConnection(), answer);
    1.17 +		strabon.describe(queryString, strabon.getSailRepoConnection(),  answer);
    1.18  		
    1.19  		return answer.toString();
    1.20  	}