@ Override public RepositoryResult < Resource > getContextIDs ( ) throws RepositoryException { try { TupleQuery tupleQuery = prepareTupleQuery ( QueryLanguage . SPARQL , ALL_GRAPH_URIS ) ; TupleQueryResult result = tupleQuery . evaluate ( ) ; return new RepositoryResult < Resource > ( new ExceptionConvertingIteration < Resource , RepositoryException > ( new ConvertingIteration < BindingSet , Resource , QueryEvaluationException > ( result ) { @ Override protected Resource convert ( BindingSet bindings ) throws QueryEvaluationException { return ( Resource ) bindings . getValue ( "g" ) ; } } ) { @ Override protected RepositoryException convert ( Exception e ) { return new RepositoryException ( e ) ; } } ) ; } catch ( MalformedQueryException e ) { throw new RepositoryException ( e ) ; } catch ( QueryEvaluationException e ) { throw new RepositoryException ( e ) ; } }
returns list of graph names as Resource