Package org.apache.vinci.transport.document

Examples of org.apache.vinci.transport.document.AFrame.fadd()


  public List callGetSupportedXCasVersions() throws ResourceServiceException {
    try {
      // create Vinci Frame ( Data Cargo)
      AFrame queryFrame = new AFrame();
      // Add Vinci Command, so that the receiving service knows what to do
      queryFrame.fadd("vinci:COMMAND", Constants.GET_SUPPORTED_XCAS_VERSIONS);

      // make RPC call
      VinciFrame resultFrame = mVinciClient.rpc(queryFrame);
      String result = resultFrame.fgetString("Result");
      if (result != null) {
View Full Code Here


  public void callBatchProcessComplete() throws ResourceServiceException {
    try {
      // create Vinci Frame ( Data Cargo)
      AFrame queryFrame = new AFrame();
      // Add Vinci Command, so that the receiving service knows what to do
      queryFrame.fadd("vinci:COMMAND", Constants.BATCH_PROCESS_COMPLETE);

      mVinciClient.send(queryFrame); // oneway call
    } catch (Exception e) {
      throw new ResourceServiceException(e);
    }
View Full Code Here

  public void callCollectionProcessComplete() throws ResourceServiceException {
    try {
      // create Vinci Frame ( Data Cargo)
      AFrame queryFrame = new AFrame();
      // Add Vinci Command, so that the receiving service knows what to do
      queryFrame.fadd("vinci:COMMAND", Constants.COLLECTION_PROCESS_COMPLETE);

      // make RPC call (return val ignored)
      mVinciClient.rpc(queryFrame, mTimeout);
    } catch (Exception e) {
      throw new ResourceServiceException(e);
View Full Code Here

    AFrame keysFrame = new AFrame();
    dataFrame.fadd("KEYS", keysFrame);
    String ueid = DATACasUtils.getFeatureValueByType(aCasData,
            org.apache.uima.collection.impl.cpm.Constants.METADATA_KEY,
            org.apache.uima.collection.impl.cpm.Constants.DOC_ID);
    keysFrame.fadd("UEID", ueid);

    AFrame keyFrame = null;
    try {
      Iterator it = aCasData.getFeatureStructures();
      while (it.hasNext()) {
View Full Code Here

   *
   * @return {@link org.apache.vinci.transport.VinciFrame} instance containing error
   */
  public VinciFrame replyWithError(String errorMsg) {
    AFrame aFrame = getAFrame();
    aFrame.fadd("Error", errorMsg);
    return aFrame;
  }

  /**
   * Package the {@link org.apache.vinci.transport.VinciFrame} containing result of the requested
View Full Code Here

    return (AFrame) conn.sendAndReceive(requestFrame, af);
  }

  public static AFrame produceAFrame(String cmd, String content) {
    AFrame query = new AFrame();
    query.fadd(Constants.VINCI_COMMAND, Constants.ANNOTATE);

    AFrame keys = new AFrame();
    keys.fadd(Constants.VINCI_DETAG, content);

    AFrame data = new AFrame();
View Full Code Here

  public static AFrame produceAFrame(String cmd, String content) {
    AFrame query = new AFrame();
    query.fadd(Constants.VINCI_COMMAND, Constants.ANNOTATE);

    AFrame keys = new AFrame();
    keys.fadd(Constants.VINCI_DETAG, content);

    AFrame data = new AFrame();
    data.fadd(Constants.KEYS, keys);
    query.fadd(Constants.DATA, data);
View Full Code Here

    AFrame keys = new AFrame();
    keys.fadd(Constants.VINCI_DETAG, content);

    AFrame data = new AFrame();
    data.fadd(Constants.KEYS, keys);
    query.fadd(Constants.DATA, data);

    return query;
  }
View Full Code Here

  public void callBatchProcessComplete() throws ResourceServiceException {
    try {
      // create Vinci Frame ( Data Cargo)
      AFrame queryFrame = new AFrame();
      // Add Vinci Command, so that the receiving service knows what to do
      queryFrame.fadd("vinci:COMMAND", Constants.BATCH_PROCESS_COMPLETE);

      mVinciClient.send(queryFrame); // oneway call
    } catch (Exception e) {
      throw new ResourceServiceException(e);
    }
View Full Code Here

  public void callCollectionProcessComplete() throws ResourceServiceException {
    try {
      // create Vinci Frame ( Data Cargo)
      AFrame queryFrame = new AFrame();
      // Add Vinci Command, so that the receiving service knows what to do
      queryFrame.fadd("vinci:COMMAND", Constants.COLLECTION_PROCESS_COMPLETE);

      // make RPC call (no return val)
      mVinciClient.rpc(queryFrame, mTimeout);
    } catch (Exception e) {
      throw new ResourceServiceException(e);
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.