Class ProjectCustomizer

java.lang.Object
org.apache.uima.pear.nature.ProjectCustomizer

public class ProjectCustomizer extends Object
A util class to handle customization of IProject with the UIMA nature
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addUIMANature(org.eclipse.core.resources.IProject project)
    Adds the UIMA nature to a project
    static org.eclipse.core.resources.IFile
    createFile(org.eclipse.core.resources.IContainer container, String fileName, InputStream is, boolean overrideContentIfExist)
    Creates a file in a project with an InputStream for the content
    static org.eclipse.core.resources.IFile
    createFile(org.eclipse.core.resources.IProject project, String fileName, String s, boolean overrideContentIfExist)
    Creates a file in a project with a string as content
    static org.eclipse.core.resources.IFolder
    createFolder(org.eclipse.core.resources.IContainer container, String folderName)
    Creates a folder, if it does not exist, in a given container
    static void
    createPearFolderStructure(org.eclipse.core.resources.IContainer container)
    Creates the PEAR folder structure
    static void
    customizeProject(org.eclipse.core.resources.IContainer container, InstallationDescriptor insd)
    Customizes an IProject with the UIMA nature using an InstallationDescriptor instance
    static void
    customizeProject(org.eclipse.core.resources.IProject project)
    Customizes an IProject with the UIMA nature using an empty installation descriptor.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • ProjectCustomizer

      public ProjectCustomizer()
  • Method Details

    • customizeProject

      public static void customizeProject(org.eclipse.core.resources.IContainer container, InstallationDescriptor insd) throws PearException
      Customizes an IProject with the UIMA nature using an InstallationDescriptor instance
      Parameters:
      container - An IProject
      insd - An InstallationDescriptor
      Throws:
      PearException - If a problem occurs
    • customizeProject

      public static void customizeProject(org.eclipse.core.resources.IProject project) throws PearException
      Customizes an IProject with the UIMA nature using an empty installation descriptor.
      Parameters:
      project - An IProject
      Throws:
      PearException - If a problem occurs
    • addUIMANature

      public static void addUIMANature(org.eclipse.core.resources.IProject project) throws PearException
      Adds the UIMA nature to a project
      Parameters:
      project - an IProject
      Throws:
      PearException - If a problem occurs
    • createPearFolderStructure

      public static void createPearFolderStructure(org.eclipse.core.resources.IContainer container) throws PearException
      Creates the PEAR folder structure
      Parameters:
      container - an IProject
      Throws:
      PearException - if a problem occurs
    • createFolder

      public static org.eclipse.core.resources.IFolder createFolder(org.eclipse.core.resources.IContainer container, String folderName) throws PearException
      Creates a folder, if it does not exist, in a given container
      Parameters:
      container - an IContainer
      folderName - The folder name
      Returns:
      the handle (IFolder) to the folder
      Throws:
      PearException - If a problem occurs
    • createFile

      public static org.eclipse.core.resources.IFile createFile(org.eclipse.core.resources.IProject project, String fileName, String s, boolean overrideContentIfExist) throws PearException
      Creates a file in a project with a string as content
      Parameters:
      project - an IProject
      fileName - pathname relative to the project
      s - A string representing the content
      overrideContentIfExist - if true, overrides existing file
      Returns:
      a handle to the file (IFile)
      Throws:
      PearException - If a problem occurs
    • createFile

      public static org.eclipse.core.resources.IFile createFile(org.eclipse.core.resources.IContainer container, String fileName, InputStream is, boolean overrideContentIfExist) throws PearException
      Creates a file in a project with an InputStream for the content
      Parameters:
      container - an IProject
      fileName - pathname relative to the project
      is - An inputStream for the the content
      overrideContentIfExist - if true, overrides existing file
      Returns:
      a handle to the file (IFile)
      Throws:
      PearException - If a problem occurs