|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdip.world.variant.VariantManager
Finds Variant-packs, which are of the format:
Also finds all SymbolPacks, which end in:
TODO: deconflict code may work better if we include the preceding "/" before
the .jar name.
Field Summary | |
static float |
VERSION_NEWEST
Version Constant representing the most recent version of a Variant or SymbolPack |
static float |
VERSION_OLDEST
Version Constant representing the most oldest version of a Variant or SymbolPack |
Method Summary | |
static java.net.URL |
getResource(SymbolPack symbolPack,
java.net.URI uri)
Gets a specific resource by properly resolving the URI to this SymbolPack. |
static java.net.URL |
getResource(java.net.URL packURL,
java.net.URI uri)
Gets a specific resource for a Variant or a SymbolPack, given a URL to the package and a reference URI. |
static java.net.URL |
getResource(Variant variant,
java.net.URI uri)
Gets a specific resource by properly resolving the URI to this Variant. |
static SymbolPack |
getSymbolPack(MapGraphic mg,
java.lang.String symbolPackName,
float symbolPackVersion)
Obtains a SymbolPack via the following criteria: If matching SymbolPack name and Version found, that is returned; otherwise Returns SymbolPack of same name but of the newest available version; otherwise Returns the newest available SymbolPack preferred by the MapGraphic (if set); otherwise Returns the first SymbolPack in the list of SymbolPacks. |
static SymbolPack |
getSymbolPack(java.lang.String name,
float version)
Finds SymbolPack with the given name, or null if no SymbolPack is found. |
static SymbolPack[] |
getSymbolPacks()
Returns the known SymbolPacks. |
static float[] |
getSymbolPackVersions(java.lang.String name)
Returns the versions of a SymbolPack that are available. |
static Variant |
getVariant(java.lang.String name,
float version)
Finds Variant with the given name, or null if no Variant is found. |
static java.net.URL |
getVariantPackageJarURL(Variant variant)
Gets the URL to the Variant package (plugin). |
static Variant[] |
getVariants()
Returns the known Variants. |
static float[] |
getVariantVersions(java.lang.String name)
Returns the versions of a variant that are available. |
static boolean |
hasSymbolPackVersion(java.lang.String name,
float version)
Returns true if the desired version was found. |
static boolean |
hasVariantVersion(java.lang.String name,
float version)
Returns true if the desired version was found. |
static void |
init(java.io.File[] searchPaths,
boolean isValidating)
Initiaize the VariantManager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final float VERSION_NEWEST
public static final float VERSION_OLDEST
Method Detail |
public static void init(java.io.File[] searchPaths, boolean isValidating) throws javax.xml.parsers.ParserConfigurationException, NoVariantsException
An exception is thrown if no File paths are specified. A "." may be used to specify th ecurrent directory.
Loaded XML may be validated if the isValidating flag is set to true.
javax.xml.parsers.ParserConfigurationException
NoVariantsException
public static Variant[] getVariants()
public static SymbolPack[] getSymbolPacks()
public static Variant getVariant(java.lang.String name, float version)
Note: Name is not case-sensitive.
public static SymbolPack getSymbolPack(java.lang.String name, float version)
Note: Name is not case-sensitive.
public static SymbolPack getSymbolPack(MapGraphic mg, java.lang.String symbolPackName, float symbolPackVersion)
Thus it is assured that a SymbolPack will always be obtained.
public static boolean hasVariantVersion(java.lang.String name, float version)
public static boolean hasSymbolPackVersion(java.lang.String name, float version)
public static float[] getVariantVersions(java.lang.String name)
public static float[] getSymbolPackVersions(java.lang.String name)
public static java.net.URL getResource(java.net.URL packURL, java.net.URI uri)
Typically, getResource(Variant, URI) or getResource(SymbolPack, URI) is preferred to this method.
public static java.net.URL getResource(Variant variant, java.net.URI uri)
public static java.net.URL getResource(SymbolPack symbolPack, java.net.URI uri)
public static java.net.URL getVariantPackageJarURL(Variant variant)
Note that this will always return a URL with a JAR prefix.
e.g.: jar:http:/the.location/ajar.zip!/
or jar:file:/c:/plugins/ajar.zip!/
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |