Package org.s3b.search.resource

Examples of org.s3b.search.resource.IndexRdfResource


   * This method has been overriden.
   * @see org.s3b.search.service.ResultObject#addResult(org.s3b.search.service.Resource)
   */
  public void addResult(IndexResource<Person, TaxonomyEntry, KOSEntry, String, String> _result) {
    if(_result instanceof IndexRdfResource) {
      IndexRdfResource resource = (IndexRdfResource)_result;
      boolean alreadyIs = this.lstResults.contains(resource);
      boolean isBanned = this.bannedResults.contains(resource);
      if (alreadyIs && !isBanned) {
        int p = this.lstResults.indexOf(resource);
        IndexRdfResource r = this.lstResults.get(p);
        r.setRank(r.getRank() + resource.getRank());
      } else if (!isBanned) {
        this.results.add(resource);
        this.lstResults.add(resource);
      } else if (alreadyIs && isBanned) {
        this.results.remove(resource);
View Full Code Here


 
        if (toBeAdded) {
         
          // add rankings
          int p = _res.indexOf(existingResource);
          IndexRdfResource r = _res.get(p);
          Double oRankRes = existingResource.getRank();
          Double oRankQue = r.getRank();

          existingResource.setRank(oRankQue + oRankRes);
         
          _res.remove(existingResource);
        }else{
View Full Code Here

    for (IndexRdfResource resource : _results)
      if (this.results.contains(resource) || this.lstResults.contains(resource)) {
       
        Iterator<IndexRdfResource> it = this.results.iterator();
        while(it.hasNext()){
          IndexRdfResource rri = it.next();
         
          if(rri.equals(resource)){
            it.remove();
            break;
          }
        }
       
View Full Code Here

 
  public org.s3b.search.resource.IndexResource<Person, TaxonomyEntry, KOSEntry,String,String> loadResource(
      String uri, Model md) {
   
   
    IndexRdfResource result = new IndexRdfResource(uri,0.0d);
    String query = String.format(RDFQuery.RDFQ_CONSTRUCT_BOOK_BY_URI.toString(), uri);
    md.open();
    //ClosableIterator<Statement> statements = md.findStatements(md.createURI("http://localhost:8080/jeromedl/resource/IE0r2Zf6"), null, null);
   
    String query2 = SparqlQuery.LOAD_BOOK_BY_URI.getFormatedQuery(uri);
View Full Code Here

    fillResource(result,statements);
    return result;
  }
  public org.s3b.search.resource.IndexResource<Person, TaxonomyEntry, KOSEntry,String,String> loadResource(
      String uri, Double rank, Model md) {
    IndexRdfResource result = new IndexRdfResource(uri,rank);
    //tring query = String.format(RDFQuery.RDFQ_CONSTRUCT_BOOK_BY_URI.toString(), uri);
    ClosableIterator<Statement> statements = md.findStatements(md.createURI(uri), null, null);
    md.commit();
//    Collection<Statement> statements = SesameWrapper.performGraphQueryAsStatements(Repository.JEROMEDL_REPOSITORY.getLocalRepository(), QueryLanguage.SERQL, query);
    fillResource(result,statements);
View Full Code Here

TOP

Related Classes of org.s3b.search.resource.IndexRdfResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.