Examples of ResultEntryImpl


Examples of org.apache.uima.simpleserver.output.impl.ResultEntryImpl

    for (int i = 0; i < l; i++) {
      // take every element in the document
      if (resultElements.item(i) instanceof Element) {
        Element element = (Element) resultElements.item(i);
        // create a ResultEntry object
        ResultEntryImpl entry = new ResultEntryImpl(element.getNodeName(), 0, 0);
        // fill the ResultEntry with data read from the element
        NamedNodeMap attributes = element.getAttributes();
        int k = attributes.getLength();
        for (int x = 0; x < k; x++) {
          Node attribute = attributes.item(x);
          if ((attribute.getNodeName() != null) && (attribute.getNodeValue() != null)) {
            entry.setAttributeValue(attribute.getNodeName(), attribute.getNodeValue());
          }
        }
        // TODO covered text - DONE

        entry.setCoveredText(element.getTextContent());

        resultEntries1.add(entry);
      }
    }
  }
View Full Code Here

Examples of org.apache.uima.simpleserver.output.impl.ResultEntryImpl

    for (int i = 0; i < l; i++) {
      // take every element in the document
      if (resultElements.item(i) instanceof Element) {
        Element element = (Element) resultElements.item(i);
        // create a ResultEntry object
        ResultEntryImpl entry = new ResultEntryImpl(element.getNodeName(), 0, 0);
        // fill the ResultEntry with data read from the element
        NamedNodeMap attributes = element.getAttributes();
        int k = attributes.getLength();
        for (int x = 0; x < k; x++) {
          Node attribute = attributes.item(x);
          if ((attribute.getNodeName() != null) && (attribute.getNodeValue() != null)) {
            entry.setAttributeValue(attribute.getNodeName(), attribute.getNodeValue());
          }
        }
        // TODO covered text - DONE

        entry.setCoveredText(element.getTextContent());

        resultEntries1.add(entry);
      }
    }
  }
View Full Code Here

Examples of org.apache.uima.simpleserver.output.impl.ResultEntryImpl

        AnnotationFS annotation = (AnnotationFS) iterator.get();
        Filter filter = tspec.getFilter();
        // Check that there either is no filter, or the FS passes the filter.
        if ((filter == null) || filter.match(annotation)) {
          // Create a new result entry, fill with attributes and add result set.
          ResultEntryImpl resultEntry = new ResultEntryImpl(tspec.getOutputTag(), annotation
              .getBegin(), annotation.getEnd());
          makeOutputs(resultEntry, annotation, tspec);
          resultEntries.add(resultEntry);
        }
View Full Code Here

Examples of org.apache.uima.simpleserver.output.impl.ResultEntryImpl

        // Skip the document annotation
        continue;
      }
      TypeMap typeMap = this.defaultTypeMap.get(annot.getType());
      // Create a new result entry, fill with attributes and add result set.
      ResultEntryImpl resultEntry = new ResultEntryImpl(typeMap.getOutputTag(), annot.getBegin(),
          annot.getEnd());
      makeOutputs(resultEntry, annot, typeMap);
      resultEntries.add(resultEntry);
    }
  }
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.