Examples of UimaSerializer


Examples of org.apache.uima.aae.UimaSerializer

  private void deserialize(String xmi, CAS cas, String casReferenceId, int highWaterMark,
          AllowPreexistingFS allow) throws Exception {
    XmiSerializationSharedData deserSharedData;
    deserSharedData = getController().getInProcessCache().getCacheEntryForCAS(casReferenceId)
            .getDeserSharedData();
    UimaSerializer uimaSerializer = SerializerCache.lookupSerializerByThreadId();
    uimaSerializer.deserializeCasFromXmi(xmi, cas, deserSharedData, true, highWaterMark, allow);
  }
View Full Code Here

Examples of org.apache.uima.aae.UimaSerializer

    deserSharedData = entry.getDeserSharedData();
    if (deserSharedData == null) {
      deserSharedData = new XmiSerializationSharedData();
      entry.setXmiSerializationData(deserSharedData);
    }
    UimaSerializer uimaSerializer = SerializerCache.lookupSerializerByThreadId();
    uimaSerializer.deserializeCasFromXmi(xmi, cas, deserSharedData, true, -1);
  }
View Full Code Here

Examples of org.apache.uima.aae.UimaSerializer

      t1 = getController().getCpuTime();
      SerialFormat serialFormat = endpoint.getSerialFormat();
      XmiSerializationSharedData deserSharedData = null;
      ReuseInfo reuseInfo = null;
     
      UimaSerializer uimaSerializer = SerializerCache.lookupSerializerByThreadId();
      byte[] binarySource = aMessageContext.getByteMessage();

      switch (serialFormat) {
      case XMI:
        // Fetch serialized CAS from the message
        String xmi = aMessageContext.getStringMessage();
        deserSharedData = new XmiSerializationSharedData();
        uimaSerializer.deserializeCasFromXmi(xmi, cas, deserSharedData, true, -1);
        break;
      case BINARY:
        // *************************************************************************
        // Register the CAS with a local cache
        // *************************************************************************
        // CacheEntry entry = getController().getInProcessCache().register(cas, aMessageContext,
        // deserSharedData, casReferenceId);
        // BINARY format may be COMPRESSED etc, so update it upon reading
        serialFormat = uimaSerializer.deserializeCasFromBinary(binarySource, cas);
        // BINARY format may be COMPRESSED etc, so update it upon reading
        endpoint.setSerialFormat(serialFormat);
        break;
      case COMPRESSED_FILTERED:
        ByteArrayInputStream bais = new ByteArrayInputStream(binarySource);
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.