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

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


    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 = 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

        {
      Object element = elements.next();
     
      if (element instanceof INlpElement)
      {
        INlpElement nlpElement = (INlpElement) element;
        newSelectionList.add(nlpElement.getResource());
      }
            else
            {
                newSelectionList.add(element);
            }
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 = CasEditorPlugin.getNlpModel().getParent(folder);
    } catch (CoreException e) {
      CasEditorPlugin.log(e);
      parent = null;
View Full Code Here

    if (element instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) element;

      IFile file = fileInput.getFile();

      INlpElement nlpElement = CasEditorPlugin.getNlpModel().findMember(file);

      if (nlpElement instanceof DocumentElement) {

        try {
          org.apache.uima.caseditor.core.IDocument workingCopy =
            ((DocumentElement) nlpElement).getDocument(true);

          AnnotationDocument document = new AnnotationDocument();
          document.setProject(nlpElement.getNlpProject());

          document.setDocument(workingCopy);
          return document;
        }
        catch (CoreException e) {
View Full Code Here

    if (element instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) element;

      IFile file = fileInput.getFile();

      INlpElement nlpElement = CasEditorPlugin.getNlpModel().findMember(file);

      if (nlpElement instanceof DocumentElement) {

        try {
          org.apache.uima.caseditor.editor.ICasDocument workingCopy =
View Full Code Here

    if (element instanceof FileEditorInput) {
      FileEditorInput fileInput = (FileEditorInput) element;

      IFile file = fileInput.getFile();

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

      if (nlpElement instanceof DocumentElement) {
        DocumentElement documentElement = (DocumentElement) nlpElement;
View Full Code Here

  protected AnnotationStyle getAnnotationStyle(Object element, Type type) {
   
    if (type == null)
      throw new IllegalArgumentException("type parameter must not be null!");
   
    INlpElement nlpElement = getNlpElement(element);

    return nlpElement.getNlpProject().getDotCorpus().getAnnotation(type);
  }
View Full Code Here

    return nlpElement.getNlpProject().getDotCorpus().getAnnotation(type);
  }

  @Override
  protected Collection<String> getShownTypes(Object element) {
    INlpElement nlpElement = getNlpElement(element);

    return nlpElement.getNlpProject().getDotCorpus().getShownTypes();
  }
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.