Package org.apache.uima.caseditor.core.uima

Examples of org.apache.uima.caseditor.core.uima.DocumentUimaImpl


      mWorkingCopy = null;
      throw new CoreException(new Status(IStatus.ERROR, CasEditorPlugin.ID,
              0, "Typesystem not available!", null));
    }

    DocumentUimaImpl document = mWorkingCopy.get();

    if (reload || document == null) {

      InputStream in = mDocumentFile.getContents();

      DocumentFormat format;
     
      if (getResource().getFileExtension().equalsIgnoreCase("xcas")) {
        format = DocumentFormat.XCAS;
      }
      else if (getResource().getFileExtension().equalsIgnoreCase("xmi")) {
        format = DocumentFormat.XMI;
      }
      else {
        throw new CoreException(new Status(IStatus.ERROR, CasEditorPlugin.ID,
                    0, "Unkown file extension!", null));
      }
     
      document  = new DocumentUimaImpl(project, this, in, format);

      mWorkingCopy = new SoftReference<DocumentUimaImpl>(document);
    }

    return document;
View Full Code Here

TOP

Related Classes of org.apache.uima.caseditor.core.uima.DocumentUimaImpl

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.