@Override public void reset() { if (!this.svd.flushEnabled) { throw new CASAdminException(CASAdminException.FLUSH_DISABLED); } if (this == this.svd.baseCAS) { resetNoQuestions(); return; } // called from a CAS view. // clear CAS ... this.svd.baseCAS.resetNoQuestions(); }
/** * * @param istream - * @throws IOException - */ public void deserialize(InputStream istream) throws IOException { Header h = readHeader(istream); // side effect, sets deserIn if (isReadingDelta) { if (!reuseInfoProvided) { throw new UnsupportedOperationException("Deserializing Delta Cas, but original not serialized from"); } } else { cas.resetNoQuestions(); } cas.reinit(h, deserIn, null, CasLoadMode.DEFAULT, this, AllowPreexistingFS.allow, null); // deserializeAfterVersion(deserIn, isReadingDelta, AllowPreexistingFS.allow); }
private XCASDeserializerHandler(CASImpl aCAS, OutOfTypeSystemData ootsData) { super(); this.cas = aCAS.getBaseCAS(); // Reset the CAS. cas.resetNoQuestions(); this.fsTree = new RedBlackTree<FSInfo>(); this.idLess = new ArrayList<FSInfo>(); this.buffer = new StringBuffer(); this.outOfTypeSystemData = ootsData; this.indexRepositories = new ArrayList<FSIndexRepository>(); this.views = new ArrayList<CAS>(); // using the baseCas for indexing Sofas indexRepositories.add(this.cas.getBaseIndexRepository()); // There should always be another index for the Initial View indexRepositories.add(this.cas.getView(CAS.NAME_DEFAULT_SOFA).getIndexRepository()); this.sofaTypeCode = cas.ll_getTypeSystem().ll_getCodeForType( cas.getTypeSystem().getType(CAS.TYPE_NAME_SOFA)); this.annotBaseType = this.cas.getAnnotationType(); this.sofaRefMap = new IntVector(); this.indexMap = new IntVector(); // add entry for baseCAS ... point non-compliant annotations at first Sofa sofaRefMap.add(1); // add entry for baseCAS ... _indexed=0 stays in 0 indexMap.add(0); }
public void reinit(CASSerializer ser) { if (this != this.svd.baseCAS) { this.svd.baseCAS.reinit(ser); return; } this.resetNoQuestions(); reinit(ser.getHeapMetadata(), ser.getHeapArray(), ser.getStringTable(), ser.getFSIndex(), ser .getByteArray(), ser.getShortArray(), ser.getLongArray()); }
casBeingFilled.resetNoQuestions();