Package org.apache.vinci.transport.document

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


  public boolean callIsStateless() 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.IS_STATELESS);

      // make RPC call
      VinciFrame resultFrame = mVinciClient.rpc(queryFrame);
      boolean result = resultFrame.fgetBoolean("Result");
      return result;
View Full Code Here


  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

    AFrame query = new AFrame();

    try {

      aPT.startEvent(aResourceName, "CAS to Vinci Request Frame", "");
      query.fadd(Constants.VINCI_COMMAND, Constants.ANNOTATE);

      AFrame dataFrame = new AFrame();

      vinciCasDataConverter.casDataToVinciFrame(aCas, dataFrame);
      query.fadd(Constants.DATA, dataFrame);
View Full Code Here

    }
    AFrame query = new AFrame();

    try {
      aPT.startEvent(aResourceName, "Vinci Call", "");
      query.fadd(Constants.VINCI_COMMAND, Constants.ANNOTATE);
      // Handle each Cas individually. For each Cas create a seperate DATA frame.
      for (int i = 0; i < aCasList.length && aCasList[i] != null; i++) {
        // String content = Vinci.getContentFromDATACas(aCas);
        // Create a request frame, and populate it with document text
        AFrame dataFrame = new AFrame();
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

  public boolean callIsReadOnly() 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.IS_READONLY);

      // make RPC call
      VinciFrame resultFrame = mVinciClient.rpc(queryFrame);
      boolean result = resultFrame.fgetBoolean("Result");
      return result;
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.