Package org.terrier.utility.io

Examples of org.terrier.utility.io.WrappedIOException


        if (_dataSource.startsWith("uk.ac.gla.terrier"))
          _dataSource = _dataSource.replaceAll("uk.ac.gla.terrier", "org.terrier");       
        try{
          this.file[i] = Class.forName(_dataSource).asSubclass(BitInSeekable.class).getConstructor(String.class).newInstance(dataFilename);
        } catch (Exception e) {
          throw new WrappedIOException(e);
        }
      }
    }
    fieldCount = _fieldCount;
    setPostingImplementation(_postingImplementation);
View Full Code Here


    try{
      postingConstructor = (fieldCount > 0)
        ? postingImplementation.getConstructor(BitIn.class, Integer.TYPE, DocumentIndex.class, Integer.TYPE)
        : postingImplementation.getConstructor(BitIn.class, Integer.TYPE, DocumentIndex.class);
    } catch (NoSuchMethodException e) {
      throw new WrappedIOException(e);
    }
  }
View Full Code Here

    try{
      rtr = (fieldCount > 0)
        ? postingConstructor.newInstance(_file, pointer.getNumberOfEntries(), fixedDi, fieldCount)
        : postingConstructor.newInstance(_file, pointer.getNumberOfEntries(), fixedDi);
    } catch (Exception e) {
      throw new WrappedIOException(e);
    }
    return rtr;
  }
View Full Code Here

      rdi.seek(startByteOffset);
      BitIn in = new BitInputStream(rdi);
      in.skipBits(startBitOffset);
      return in;
    } catch (CloneNotSupportedException e) {
      throw new WrappedIOException(e);
    }
  }
View Full Code Here

    try{
      rtr = (fieldCount > 0)
        ? postingConstructor.newInstance(_file, pointer.getNumberOfEntries(), doi, fieldCount)
        : postingConstructor.newInstance(_file, pointer.getNumberOfEntries(), doi);
    } catch (Exception e) {
      throw new WrappedIOException(e);
    }
    return rtr;
  }
View Full Code Here

    /**
     * Validates the structure based on the job configuration
     */
    public void validateInput(JobConf jc) throws IOException {
      if (jc.get(STRUCTURE_NAME_JC_KEY, null) == null)
        throw new WrappedIOException(new IllegalArgumentException("Key " + STRUCTURE_NAME_JC_KEY +" not specified"));
    }
View Full Code Here

        .getConstructor(String.class, Boolean.TYPE, FixedSizeWriteableFactory.class, FixedSizeWriteableFactory.class)
        .newInstance(filename, false, keyFactory, valueFactory);
      }
      catch (Exception e)
      {
      throw new WrappedIOException("Could not find a class for FSOMapFileLexicon", e);
    }
      return rtr;
    }
View Full Code Here

      int termId = lee.getValue().getTermId();
      if (! (termId == lastTermId+1))
        termIdsAligned = false;
      if (termid2index[termId] != -1)
      {
        throw new WrappedIOException(new IllegalArgumentException("Termid " + termId + " is not unique - used at entries " +termid2index[termId]+ " and" + counter));
      }
      termid2index[termId] = counter;
      lastTermId = termId;
     
      //bsearch reduction optimisaion
View Full Code Here

TOP

Related Classes of org.terrier.utility.io.WrappedIOException

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.