Examples of CASCompleteSerializer


Examples of org.apache.uima.cas.impl.CASCompleteSerializer

      // get CAS object from pool
      cas = mCasPool.getCas(0);

      // deserialize into CAS object
      byte[] casBytes = aRequestFrame.fgetTrueBinary("BinaryCAS");
      CASCompleteSerializer serializer = (CASCompleteSerializer) SerializationUtils
              .deserialize(casBytes);
      Serialization.deserializeCASComplete(serializer, (CASMgr) cas);

      long annotStartTime = System.currentTimeMillis();
      // invoke Analysis Engine
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

    try {
      AFrame requestFrame = new AFrame();
      requestFrame.fset(Constants.VINCI_COMMAND, Constants.ANNOTATE);
      // serialize CAS (including type system)
      CASMgr cas = (CASMgr) aCAS;
      CASCompleteSerializer serializer = Serialization.serializeCASComplete(cas);

      requestFrame.fsetTrueBinary("BinaryCAS", SerializationUtils.serialize(serializer));

      AFrame responseFrame = (AFrame) mVinciClient.sendAndReceive(requestFrame, mTimeout);
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

      byteStream.close();
      System.out.println("Got " + bytes.length + " bytes.");

      // deserialize CAS
      CASMgr casMgr = CASFactory.createCAS();
      CASCompleteSerializer serializer = (CASCompleteSerializer) SerializationUtils
              .deserialize(bytes);
      Serialization.deserializeCASComplete(serializer, casMgr);

      // get 2nd applet parameter - right-to-left text orientation
      boolean rightToLeft = false;
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

      byteStream.close();
      System.out.println("Got " + bytes.length + " bytes.");

      // deserialize CAS
      CASMgr casMgr = CASFactory.createCAS();
      CASCompleteSerializer serializer = (CASCompleteSerializer) SerializationUtils
              .deserialize(bytes);
      Serialization.deserializeCASComplete(serializer, casMgr);

      // create tree viewer component and add to this applet
      mTreeViewer = new CasTreeViewer(casMgr.getCAS().getView(CAS.NAME_DEFAULT_SOFA));
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

      List<MetaDataObject> l = new ArrayList<MetaDataObject>();
      l.add(aed);
      l.add(tsd);
      CAS cas1 = CasCreationUtils.createCas(l);
      cas1.setDocumentText("foo");
      CASCompleteSerializer ser = Serialization.serializeCASComplete((CASMgr) cas1);

      CAS tcas2 = CasCreationUtils.createCas(new TypeSystemDescription_impl(), null, null);
      CASImpl cas2 = ((CASImpl) tcas2).getBaseCAS();
      tcas2.setDocumentText("bar");
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

              new XMLInputSource(JUnitExtension
                      .getFile("ExampleTae/arrayTypeSerialization.xml")));
    
      CAS cas1 = CasCreationUtils.createCas(aed);
      cas1.setDocumentText("foo");
      CASCompleteSerializer ser = Serialization.serializeCASComplete((CASMgr) cas1);

      CAS tcas2 = CasCreationUtils.createCas(new TypeSystemDescription_impl(), null, null);
      CASImpl cas2 = ((CASImpl) tcas2).getBaseCAS();
      tcas2.setDocumentText("bar");
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

    // System.out.println("Before serialization\n");
    // System.out.println("Size of ordered index: " + ordSize);
    // System.out.println("Size of set index: " + setSize);
    // System.out.println("Size of bag index: " + bagSize);

    CASCompleteSerializer cs;
    cs = Serialization.serializeCASComplete(casMgr);
    // casMgr = CASFactory.createCAS();
    CASMgr realCasMgr = CASFactory.createCAS();
    ((CASImpl) realCasMgr).commitTypeSystem();
    Serialization.deserializeCASComplete(cs, realCasMgr);
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

      } catch (Exception e) {
        assertTrue(false);
      }
      ((CAS) cas).setDocumentText("Create the sofa for the inital view");
      assertTrue(((CASImpl) cas).isBackwardCompatibleCas());
      CASCompleteSerializer ser = Serialization.serializeCASComplete(cas);

      // deserialize into a new CAS with a type system that only contains the builtins
      CAS newCas = CasCreationUtils.createCas(new TypeSystemDescription_impl(), null, null);

      try {
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

    try {
      AFrame requestFrame = new AFrame();
      requestFrame.fset(Constants.VINCI_COMMAND, Constants.ANNOTATE);
      // serialize CAS (including type system)
      CASMgr cas = (CASMgr) aCAS;
      CASCompleteSerializer serializer = Serialization.serializeCASComplete(cas);

      requestFrame.fsetTrueBinary("BinaryCAS", SerializationUtils.serialize(serializer));

      AFrame responseFrame = (AFrame) mVinciClient.sendAndReceive(requestFrame, mTimeout);
View Full Code Here

Examples of org.apache.uima.cas.impl.CASCompleteSerializer

      // get CAS object from pool
      cas = mCasPool.getCas(0);

      // deserialize into CAS object
      byte[] casBytes = aRequestFrame.fgetTrueBinary("BinaryCAS");
      CASCompleteSerializer serializer = (CASCompleteSerializer) SerializationUtils
              .deserialize(casBytes);
      Serialization.deserializeCASComplete(serializer, (CASMgr) cas);

      long annotStartTime = System.currentTimeMillis();
      // invoke Analysis Engine
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.