Examples of XCasToCasDataSaxHandler


Examples of org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler

   * @return CasData object containing all information from the CAS
   */
  public CasData casContainerToCasData(CAS aContainer) {
    // generate XCAS events and pipe them to XCasToCasDataSaxHandler
    CasData result = new CasDataImpl();
    XCasToCasDataSaxHandler handler = new XCasToCasDataSaxHandler(result);
    XCASSerializer xcasSer = new XCASSerializer(aContainer.getTypeSystem());
    xcasSer.setDocumentTypeName(this.getDocumentTextTypeName());
    xcasSer.setDocumentTextFeature(this.getDocumentTextFeatureName());
    try {
      xcasSer.serialize(aContainer, handler);
View Full Code Here

Examples of org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler

   */
  public void appendVinciFrameToCasData(AFrame aCasFrame, CasData aCasData) throws SAXException {
    // Use VinciSaxParser to generate SAX events from VinciFrame, and send
    // them to XCasToCasDataSaxHandler
    VinciSaxParser vinciSaxParser = new VinciSaxParser();
    XCasToCasDataSaxHandler handler = new XCasToCasDataSaxHandler(aCasData);
    handler.startDocument();
    handler.startElement("", "CAS", "CAS", null);
    vinciSaxParser.setContentHandler(handler);
    vinciSaxParser.parse(aCasFrame, false);
    handler.endElement("", "CAS", "CAS");
    handler.endDocument();
  }
View Full Code Here

Examples of org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler

   * @return CasData object containing all information from the CAS
   */
  public CasData casContainerToCasData(CAS aContainer) {
    // generate XCAS events and pipe them to XCasToCasDataSaxHandler
    CasData result = new CasDataImpl();
    XCasToCasDataSaxHandler handler = new XCasToCasDataSaxHandler(result);
    XCASSerializer xcasSer = new XCASSerializer(aContainer.getTypeSystem());
    xcasSer.setDocumentTypeName(this.getDocumentTextTypeName());
    xcasSer.setDocumentTextFeature(this.getDocumentTextFeatureName());
    try {
      xcasSer.serialize(aContainer, handler);
View Full Code Here

Examples of org.apache.uima.cas_data.impl.XCasToCasDataSaxHandler

   */
  public void appendVinciFrameToCasData(AFrame aCasFrame, CasData aCasData) throws SAXException {
    // Use VinciSaxParser to generate SAX events from VinciFrame, and send
    // them to XCasToCasDataSaxHandler
    VinciSaxParser vinciSaxParser = new VinciSaxParser();
    XCasToCasDataSaxHandler handler = new XCasToCasDataSaxHandler(aCasData);
    handler.startDocument();
    handler.startElement("", "CAS", "CAS", null);
    vinciSaxParser.setContentHandler(handler);
    vinciSaxParser.parse(aCasFrame, false);
    handler.endElement("", "CAS", "CAS");
    handler.endDocument();
  }
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.