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

Examples of org.apache.uima.caseditor.core.model.DocumentElement


    // TODO: refactor this
    // how to retrieve the project of the selected elements ?
    // what happens if someone selects DocumentElements form
    // different projects ?
    if (!documentElements.isEmpty()) {
      DocumentElement aDocument = documentElements.getFirst();

      NlpProject project = aDocument.getNlpProject();

      Collection<CasProcessorFolder> sourceFolders = project.getCasProcessorFolders();

      for (CasProcessorFolder sourceFolder : sourceFolders) {
        Collection<AnnotatorElement> annotators = sourceFolder.getAnnotators();
View Full Code Here


   * Copies the next text with all annotation to the given cas object.
   *
   * @throws CollectionException -
   */
  public void getNext(CAS cas) throws CollectionException {
    DocumentElement document = (DocumentElement) mDocumentIterator.next();

    CAS documentCas = null;

    try {
      documentCas = document.getDocument(false).getCAS();
    } catch (CoreException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

View Full Code Here

   * Copies the next text with all annotation to the given cas object.
   *
   * @throws CollectionException -
   */
  public void getNext(CAS cas) throws CollectionException {
    DocumentElement document = documentIterator.next();

    CAS documentCas = null;

    try {
      documentCas = document.getDocument(false).getCAS();
    } catch (CoreException e) {
      // TODO Handle this exception well
      e.printStackTrace();
    }

View Full Code Here

      INlpElement nlpElement =
              org.apache.uima.caseditor.CasEditorPlugin.getNlpModel().findMember(file);

      if (nlpElement instanceof DocumentElement) {
        DocumentElement documentElement = (DocumentElement) nlpElement;

        try {
          documentElement.saveDocument();
        } catch (CoreException e) {
          fireElementStateChangeFailed(element);
          throw e;
        }
      } else {
View Full Code Here

    private CAS mCAS;

    @Override
    protected Control createContents(Composite parent)
    {
        DocumentElement document = (DocumentElement) getElement();

        try {
      mCAS = document.getDocument(false).getCAS();
    } catch (CoreException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

  public void testDocumentCasCreation() throws CoreException {
    mProject.createProject();
    mProject.createProjectContent();
    mProject.createDotCorpus();

    DocumentElement document = ((DocumentElement) CasEditorPlugin.getNlpModel().findMember(
            mProject.getDocument()));

    assertTrue(document.getDocument(true).getCAS().getDocumentText().length() > 0);
  }
View Full Code Here

    // TODO: refactor this
    // how to retrieve the project of the selected elements ?
    // what happens if someone selects DocumentElements form
    // different projects ?
    if (!documentElements.isEmpty()) {
      DocumentElement aDocument = documentElements.getFirst();

      NlpProject project = aDocument.getNlpProject();

      Collection<CasProcessorFolder> sourceFolders = project.getCasProcessorFolders();

      for (CasProcessorFolder sourceFolder : sourceFolders) {
        Collection<AnnotatorElement> annotators = sourceFolder.getAnnotators();
View Full Code Here

      INlpElement nlpElement =
              org.apache.uima.caseditor.CasEditorPlugin.getNlpModel().findMember(file);

      if (nlpElement instanceof DocumentElement) {
        DocumentElement documentElement = (DocumentElement) nlpElement;

        try {
          documentElement.saveDocument();
        } catch (CoreException e) {
          fireElementStateChangeFailed(element);
          throw e;
        }
      } else if (CasEditorPlugin.getNlpModel().
View Full Code Here

TOP

Related Classes of org.apache.uima.caseditor.core.model.DocumentElement

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.