Package org.apache.vinci.transport

Examples of org.apache.vinci.transport.FrameLeaf


      if (!done) {
        cleanup(); // release the cas back to the pool if we didn't parse successfully.
      }
    }
    if (error != null) {
      return new KeyValuePair(TransportConstants.ERROR_KEY, new FrameLeaf(error));
    }
    // Debug.p("Testing: " + extraDataFrame.toXML());
    return null;
  }
View Full Code Here


      } else {
        StackEntry child = (StackEntry) top.sub_entries.get(0);
        // Debug.p("Frameleaf.");
        if (top.sub_entries.size() == 1 && child.sub_entries == null) {
          // This is a frameleaf
          top.component = new FrameLeaf(child.ename_or_pcdata);
        } else {
          VinciFrame c = new VinciFrame();
          top.component = c;
          for (int i = 0; i < top.sub_entries.size(); i++) {
            child = (StackEntry) top.sub_entries.get(i);
View Full Code Here

        }

        FeatureStructure vfs = new FeatureStructureImpl();
        vfs.setType(featureStructureType);

        FrameLeaf leafFrame = kvp.getValueAsLeaf();

        PrimitiveValue pv = new PrimitiveValueImpl(leafFrame.toString());
        vfs.setFeatureValue(featureStructureType, pv);
        dataCas.addFeatureStructure(vfs);
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

        FeatureValue value = null;
        String[] keys = fs.getFeatureNames();
        for (int i = 0; i < keys.length; i++) {
          value = fs.getFeatureValue(keys[i]);
          if (value instanceof PrimitiveValueImpl || value instanceof PrimitiveValue) {
            keyFrame.add("", new FrameLeaf(value.toString()));
          }
        }
        // Convert the type to make
        String type = fs.getType();
        if (type.indexOf(org.apache.uima.collection.impl.cpm.Constants.LONG_COLON_TERM) > -1) {
View Full Code Here

        }

        FeatureStructure vfs = new FeatureStructureImpl();
        vfs.setType(featureStructureType);

        FrameLeaf leafFrame = kvp.getValueAsLeaf();

        PrimitiveValue pv = new PrimitiveValueImpl(leafFrame.toString());
        vfs.setFeatureValue(featureStructureType, pv);
        dataCas.addFeatureStructure(vfs);
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

        FeatureValue value = null;
        String[] keys = fs.getFeatureNames();
        for (int i = 0; i < keys.length; i++) {
          value = fs.getFeatureValue(keys[i]);
          if (value instanceof PrimitiveValueImpl || value instanceof PrimitiveValue) {
            keyFrame.add("", new FrameLeaf(value.toString()));
          }
        }
        // Convert the type to make
        String type = fs.getType();
        if (type.indexOf(org.apache.uima.collection.impl.cpm.Constants.LONG_COLON_TERM) > -1) {
View Full Code Here

      } else {
        StackEntry child = (StackEntry) top.sub_entries.get(0);
        // Debug.p("Frameleaf.");
        if (top.sub_entries.size() == 1 && child.sub_entries == null) {
          // This is a frameleaf
          top.component = new FrameLeaf(child.ename_or_pcdata);
        } else {
          VinciFrame c = new VinciFrame();
          top.component = c;
          for (int i = 0; i < top.sub_entries.size(); i++) {
            child = (StackEntry) top.sub_entries.get(i);
View Full Code Here

      } else {
        StackEntry child = (StackEntry) top.sub_entries.get(0);
        // Debug.p("Frameleaf.");
        if (top.sub_entries.size() == 1 && child.sub_entries == null) {
          // This is a frameleaf
          top.component = new FrameLeaf(child.ename_or_pcdata);
        } else {
          VinciFrame c = new VinciFrame();
          top.component = c;
          for (int i = 0; i < top.sub_entries.size(); i++) {
            child = (StackEntry) top.sub_entries.get(i);
View Full Code Here

        }

        FeatureStructure vfs = new FeatureStructureImpl();
        vfs.setType(featureStructureType);

        FrameLeaf leafFrame = kvp.getValueAsLeaf();

        PrimitiveValue pv = new PrimitiveValueImpl(leafFrame.toString());
        vfs.setFeatureValue(featureStructureType, pv);
        dataCas.addFeatureStructure(vfs);
      }
    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

        FeatureValue value = null;
        String[] keys = fs.getFeatureNames();
        for (int i = 0; i < keys.length; i++) {
          value = fs.getFeatureValue(keys[i]);
          if (value instanceof PrimitiveValueImpl || value instanceof PrimitiveValue) {
            keyFrame.add("", new FrameLeaf(value.toString()));
          }
        }
        // Convert the type to make
        String type = fs.getType();
        if (type.indexOf(org.apache.uima.collection.impl.cpm.Constants.LONG_COLON_TERM) > -1) {
View Full Code Here

TOP

Related Classes of org.apache.vinci.transport.FrameLeaf

Copyright © 2018 www.massapicom. 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.