question: public void populatePcj ( final Connector accumuloConn , final String pcjTableName , final RepositoryConnection ryaConn ) throws PCJStorageException { checkNotNull ( accumuloConn ) ; checkNotNull ( pcjTableName ) ; checkNotNull ( ryaConn ) ; try { final PcjMetadata pcjMetadata = getPcjMetadata ( accumuloConn , pcjTableName ) ; final String sparql = pcjMetadata . getSparql ( ) ; final TupleQuery query = ryaConn . prepareTupleQuery ( QueryLanguage . SPARQL , sparql ) ; final TupleQueryResult results = query . evaluate ( ) ; final Set < VisibilityBindingSet > batch = new HashSet < > ( 1000 ) ; while ( results . hasNext ( ) ) { batch . add ( new VisibilityBindingSet ( results . next ( ) ) ) ; if ( batch . size ( ) == 1000 ) { addResults ( accumuloConn , pcjTableName , batch ) ; batch . clear ( ) ; } } if ( ! batch . isEmpty ( ) ) { addResults ( accumuloConn , pcjTableName , batch ) ; } } catch ( RepositoryException | MalformedQueryException | QueryEvaluationException e ) { throw new PCJStorageException ( "Could not populate a PCJ table with Rya results for the table named: " + pcjTableName , e ) ; } }
target:  Scan Rya for results that solve the PCJ's query and store them in the PCJ table. <p> This method assumes the PCJ table has already been created.