Package org.apache.uima.pear.insd.edit
Class PearInstallationDescriptor
java.lang.Object
org.apache.uima.pear.insd.edit.PearInstallationDescriptor
Handles the PEAR installation descriptor (install.xml)
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
adds the $main_root/ macro as a prefix to the given string.static void
createInstallationDescriptor
(org.eclipse.core.resources.IContainer newContainer, InstallationDescriptor insd, boolean overrideContentIfExist) Create the PEAR installation descriptor file (install.xml) using a given InstallationDescriptor instance.static InstallationDescriptor
getInstallationDescriptor
(org.eclipse.core.resources.IContainer currentContainer) Returns an InstallationDescriptor instance representing the installation descriptor of the given project.static void
saveInstallationDescriptor
(org.eclipse.core.resources.IContainer currentContainer, InstallationDescriptor insd) Save installation descriptor.
-
Field Details
-
INSTALLATION_DESCRIPTOR_PATH
The Constant INSTALLATION_DESCRIPTOR_PATH.- See Also:
-
-
Constructor Details
-
PearInstallationDescriptor
public PearInstallationDescriptor()
-
-
Method Details
-
saveInstallationDescriptor
public static void saveInstallationDescriptor(org.eclipse.core.resources.IContainer currentContainer, InstallationDescriptor insd) throws org.eclipse.core.runtime.CoreException, IOException Save installation descriptor.- Parameters:
currentContainer
- An IProject with the UIMA natureinsd
- The installation descriptor object- Throws:
org.eclipse.core.runtime.CoreException
- if there is problem accessing the corresponding resourceIOException
- if there is problem writing to the corresponding resource
-
getInstallationDescriptor
public static InstallationDescriptor getInstallationDescriptor(org.eclipse.core.resources.IContainer currentContainer) throws IOException, SAXException, org.eclipse.core.runtime.CoreException, PearException Returns an InstallationDescriptor instance representing the installation descriptor of the given project. If not existent, it return and empty InstallationDescriptor instance.- Parameters:
currentContainer
- An IProject with the UIMa Nature- Returns:
- InstallationDescriptor The Installation descriptor object
- Throws:
IOException
- if there is problem writing to the xml file of the installation descriptorSAXException
- if there is problem parsing the xml of the installation descriptororg.eclipse.core.runtime.CoreException
- if there is problem with resourcesPearException
- if there is problem with PEAR related operations
-
createInstallationDescriptor
public static void createInstallationDescriptor(org.eclipse.core.resources.IContainer newContainer, InstallationDescriptor insd, boolean overrideContentIfExist) throws PearException Create the PEAR installation descriptor file (install.xml) using a given InstallationDescriptor instance.- Parameters:
newContainer
- An IProject with the UIMA natureinsd
- an instance of InstallationdescriptoroverrideContentIfExist
- if true overrides any existing install.xml- Throws:
PearException
- If a problem occurs.
-
addMacro
adds the $main_root/ macro as a prefix to the given string.- Parameters:
s
- a String representing a relative path to the project root- Returns:
- The String with the macro
-