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

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


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

      IFile casFile = fileInput.getFile();

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

      // Thats the case if the CAS is inside a Cas Editor Project
      // and part of a corpus folder
      if (nlpElement instanceof DocumentElement) {
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

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

    if (nlpElement != null) {
      return nlpElement.getNlpProject().getDotCorpus().getAnnotation(type);
    }
    else {
      DotCorpus dotCorpus = getStyle(element);
     
      return dotCorpus.getAnnotation(type);
View Full Code Here

  // TODO: Disk must be accessed for every changed annotation style
  // add a second method which can take all changed styles
  @Override
  public void setAnnotationStyle(Object element, AnnotationStyle style) {
    INlpElement nlpElement = getNlpElement(element);

    if (nlpElement != null) {
      nlpElement.getNlpProject().getDotCorpus().setStyle(style);
     
      try {
        nlpElement.getNlpProject().getDotCorpus().serialize();
      } catch (CoreException e) {
        CasEditorPlugin.log(e);
      }
     
    }
View Full Code Here

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

    if (nlpElement != null) {
      return nlpElement.getNlpProject().getDotCorpus().getShownTypes();
    }
    else {
      DotCorpus dotCorpus = getStyle(element);
     
      return dotCorpus.getShownTypes();
View Full Code Here

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

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

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

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

    if (nlpElement != null) {
      return nlpElement.getNlpProject().getEditorAnnotationStatus();
    }
    else {
      EditorAnnotationStatus status = sharedEditorStatus.get(getTypesystemId(element));
     
      if (status == null)
View Full Code Here

  }

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

    if (nlpElement != null) {
      nlpElement.getNlpProject().setEditorAnnotationStatus(editorAnnotationStatus);
    }
    else {
      sharedEditorStatus.put(getTypesystemId(element), editorAnnotationStatus);
    }
  }
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.