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

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


    return nlpElement.getNlpProject().getDotCorpus().getShownTypes();
  }
 
  @Override
  protected void addShownType(Object element, Type type) {
    INlpElement nlpElement = getNlpElement(element);
   
    nlpElement.getNlpProject().getDotCorpus().addShownType(type.getName());
   
    try {
      nlpElement.getNlpProject().getDotCorpus().serialize();
    } catch (CoreException e) {
      CasEditorPlugin.log(e);
    }
  }
View Full Code Here


    }
  }
 
  @Override
  protected void removeShownType(Object element, Type type) {
    INlpElement nlpElement = getNlpElement(element);

    nlpElement.getNlpProject().getDotCorpus().removeShownType(type.getName());
   
    try {
      nlpElement.getNlpProject().getDotCorpus().serialize();
    } catch (CoreException e) {
      CasEditorPlugin.log(e);
    }
  }
View Full Code Here

    }
  }
 
  @Override
  protected EditorAnnotationStatus getEditorAnnotationStatus(Object element) {
    INlpElement nlpElement = getNlpElement(element);

    return nlpElement.getNlpProject().getEditorAnnotationStatus();
  }
View Full Code Here

  }

  @Override
  protected void setEditorAnnotationStatus(Object element,
          EditorAnnotationStatus editorAnnotationStatus) {
    INlpElement nlpElement = getNlpElement(element);

    nlpElement.getNlpProject().setEditorAnnotationStatus(editorAnnotationStatus);
  }
View Full Code Here

    /**
     * Executes the default action, in this case the open action.
     */
  public void executeDefaultAction(IStructuredSelection selection) {
    if (selection.getFirstElement() instanceof INlpElement) {
      INlpElement nlpElement = (INlpElement) selection.getFirstElement();

      openActionGroup.executeDefaultAction(new StructuredSelection(nlpElement.getResource()));
    } else {
      openActionGroup.executeDefaultAction(selection);
    }
  }
View Full Code Here

    for (Iterator<?> elements = selection.iterator(); elements.hasNext();) {
      Object element = elements.next();

      if (element instanceof INlpElement) {
        INlpElement nlpElement = (INlpElement) element;
        newSelectionList.add(nlpElement.getResource());
      } else {
        newSelectionList.add(element);
      }
    }
View Full Code Here

    IFile file = (IFile) o;

    // first check if there is an nlp element parent,
    // if this is not the case than use the resource parent

    INlpElement parent;
    try {
      parent = org.apache.uima.caseditor.CasEditorPlugin.getNlpModel().getParent(file);
    } catch (CoreException e) {
      CasEditorPlugin.log(e);
      parent = null;
View Full Code Here

    /**
     * Retrieves the name of the element.
     */
    public String getLabel(Object o)
    {
        INlpElement element = (INlpElement) o;

        return element.getName();
    }
View Full Code Here

    /**
     * Retrieves the parent element;
     */
    public Object getParent(Object o)
    {
        INlpElement element = (INlpElement) o;

        return element.getParent();
    }
View Full Code Here

    IFolder folder = (IFolder) o;

    // first check if there is an nlp element parent,
    // if this is not the case than use the resource parent

    INlpElement parent;
    try {
      parent = org.apache.uima.caseditor.CasEditorPlugin.getNlpModel().getParent(folder);
    } catch (CoreException e) {
      CasEditorPlugin.log(e);
      parent = null;
View Full Code Here

TOP

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

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.