@CreoleResource(tool=true, isPrivate=true, autoinstances=, name="Upgrade XGapp", comment="Upgrades an XGapp to use new style GATE plugins") public class UpgradeXGAPP extends Object
Modifier and Type | Class and Description |
---|---|
static class |
UpgradeXGAPP.UpgradeAction |
static class |
UpgradeXGAPP.UpgradePath |
Constructor and Description |
---|
UpgradeXGAPP() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.aether.version.Version |
getDefaultSelection(org.eclipse.aether.resolution.VersionRangeResult vrr) |
static org.eclipse.aether.resolution.VersionRangeResult |
getPluginVersions(String group,
String artifact) |
static void |
loadUpgradePaths(List<UpgradeXGAPP.UpgradePath> paths,
URI xgappUri,
File inputFile)
Load a saved upgrade definition TSV file (such as would be written by
saveUpgradePaths(java.util.List<gate.util.persistence.UpgradeXGAPP.UpgradePath>, java.net.URI, java.io.File) ) and apply its instructions to the given list of
upgrade paths extracted from another xgapp. |
static void |
main(String[] args) |
static String |
mapDirectoryNameToPlugin(String oldName)
Attempts to map an old-style name of an 8.4 plugin under the GATE
plugins folder into the corresponding Maven artifact ID under
uk.ac.gate.plugins.
|
static void |
saveUpgradePaths(List<UpgradeXGAPP.UpgradePath> paths,
URI xgappUri,
File outputFile)
Save details of the given set of upgrade paths to a TSV file that can be re-used
later when upgrading other apps.
|
static List<UpgradeXGAPP.UpgradePath> |
suggest(org.jdom.Document doc) |
static void |
upgrade(org.jdom.Document doc,
List<UpgradeXGAPP.UpgradePath> upgrades) |
public static org.eclipse.aether.version.Version getDefaultSelection(org.eclipse.aether.resolution.VersionRangeResult vrr)
public static List<UpgradeXGAPP.UpgradePath> suggest(org.jdom.Document doc) throws IOException, org.jdom.JDOMException
IOException
org.jdom.JDOMException
public static String mapDirectoryNameToPlugin(String oldName)
oldName
- the old plugin directory namepublic static void upgrade(org.jdom.Document doc, List<UpgradeXGAPP.UpgradePath> upgrades) throws org.jdom.JDOMException
org.jdom.JDOMException
public static org.eclipse.aether.resolution.VersionRangeResult getPluginVersions(String group, String artifact)
public static void saveUpgradePaths(List<UpgradeXGAPP.UpgradePath> paths, URI xgappUri, File outputFile) throws IOException
Save details of the given set of upgrade paths to a TSV file that can be re-used later when upgrading other apps. Each line has either two or five fields:
oldPath
, with $relpath$
,
$sysprop$
and $resourceshome
expanded to absolute URIsSKIP
, PLUGIN_ONLY
or
UPGRADE
).paths
- the list of upgrade paths to persistxgappUri
- the location of the xgapp file we are upgrading, against which
$relpath$
locations will be resolved.outputFile
- the file in which to save the output.IOException
- if an error occurs writing the file.public static void loadUpgradePaths(List<UpgradeXGAPP.UpgradePath> paths, URI xgappUri, File inputFile) throws IOException
saveUpgradePaths(java.util.List<gate.util.persistence.UpgradeXGAPP.UpgradePath>, java.net.URI, java.io.File)
) and apply its instructions to the given list of
upgrade paths extracted from another xgapp.paths
- the list of upgrade paths to modify according to the saved
instructionsxgappUri
- the location of the xgapp from which paths
were extracted, used to resolve any $relpath$
locationsinputFile
- the TSV file of upgrade instructionsIOException
- if an error occurs while reading the file.Copyright © 2024 GATE. All rights reserved.