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

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


      }

      // TODO: refactor this here
      if (!corpora.isEmpty()) {
        CorpusElement aCorpus = corpora.getFirst();
        NlpProject project = aCorpus.getNlpProject();

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

        for (CasProcessorFolder sourceFolder : sourceFolders) {

          Collection<ConsumerElement> consumers = sourceFolder.getConsumers();
View Full Code Here


     */
    public Object[] getChildren(Object o)
    {
        Object result[];
       
        NlpProject nlpProject = (NlpProject) o;
       
        if (nlpProject.getProject().isOpen())
        {
            LinkedList<Object> childrenList = new LinkedList<Object>();
           
            childrenList.addAll(nlpProject.getCorpora());
           
            if (nlpProject.getTypesystemElement() != null)
            {
                childrenList.add(nlpProject.getTypesystemElement());
            }
           
            IResource[] resources;
            try
            {
                resources = nlpProject.getResources();
            }
            catch (CoreException e)
            {
                // TODO just log it
                return new Object[]{};
            }
           
            if (resources != null)
            {
                Collections.addAll(childrenList, resources);
            }
           
            childrenList.addAll(nlpProject.getCasProcessorFolders());
           
            result = childrenList.toArray();

        }
        else
View Full Code Here

     *
     * @return the <code>ImageDescriptor</code>
     */
    public ImageDescriptor getImageDescriptor(Object object)
    {
        NlpProject nlpProject = (NlpProject) object;
       
        IProject project = nlpProject.getProject();
       
        if (project.isOpen())
        {
          return CasEditorPlugin.getTaeImageDescriptor(Images.MODEL_PROJECT_OPEN);
        }
View Full Code Here

        {
            throw new InvocationTargetException(e, "CorporaCollectionReader.xml"
                    + " could ne be parsed!");
        }
       
        NlpProject project =
                mConfiguration.getConsumerElement().getNlpProject();
       
        InputStream inTypeSystemDescription;
        try
        {
            inTypeSystemDescription =
                project.getDotCorpus().getTypeSystemFile().getContents();
        }
        catch (CoreException e)
        {
            throw new InvocationTargetException(e);
        }
View Full Code Here

    // 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();

        for (AnnotatorElement annotator : annotators) {
View Full Code Here

    }
   
    @Override
    protected void createFieldEditors()
    {
        NlpProject nlpProject = ((INlpElement) getElement()).getNlpProject();
       
        mDotCorpusPropertyStore = new DotCorpusPreferenceStore(nlpProject
                .getDotCorpus());
       
        Composite parent = getFieldEditorParent();
       
        // uima config folder
View Full Code Here

    @Override
    public void createControl(Composite parent)
    {
        if (isPropertyPage())
        {
            NlpProject nlpProject = getProject();
           
            mPreferenceStore = new DotCorpusPreferenceStore(
                    nlpProject.getDotCorpus());
        }
       
        super.createControl(parent);
       
        if (isPropertyPage())
View Full Code Here

        {
            throw new InvocationTargetException(e, "CorporaCollectionReader.xml"
                    + " could ne be parsed!");
        }

        NlpProject project =
                mConfiguration.getConsumerElement().getNlpProject();

        InputStream inTypeSystemDescription;
        try
        {
            inTypeSystemDescription =
                project.getDotCorpus().getTypeSystemFile().getContents();
        }
        catch (CoreException e)
        {
            throw new InvocationTargetException(e);
        }
View Full Code Here

    }

    @Override
    protected void createFieldEditors()
    {
        NlpProject nlpProject = ((INlpElement) getElement()).getNlpProject();

        mDotCorpusPropertyStore = new DotCorpusPreferenceStore(nlpProject
                .getDotCorpus());

        Composite parent = getFieldEditorParent();

        // uima config folder
View Full Code Here

      }

      // TODO: refactor this here
      if (!corpora.isEmpty()) {
        CorpusElement aCorpus = corpora.getFirst();
        NlpProject project = aCorpus.getNlpProject();

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

        for (CasProcessorFolder sourceFolder : sourceFolders) {

          Collection<ConsumerElement> consumers = sourceFolder.getConsumers();
View Full Code Here

TOP

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

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.