public class KARFile extends java.util.jar.JarFile implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
CENATT |
static int |
CENATX |
static int |
CENCOM |
static int |
CENCRC |
static int |
CENDSK |
static int |
CENEXT |
static int |
CENFLG |
static int |
CENHDR |
static int |
CENHOW |
static int |
CENLEN |
static int |
CENNAM |
static int |
CENOFF |
static long |
CENSIG |
static int |
CENSIZ |
static int |
CENTIM |
static int |
CENVEM |
static int |
CENVER |
static java.lang.String |
CURRENT_VERSION |
static java.lang.String |
DEP_SEPARATOR
Separator to be used for dependency lists.
|
static int |
ENDCOM |
static int |
ENDHDR |
static int |
ENDOFF |
static long |
ENDSIG |
static int |
ENDSIZ |
static int |
ENDSUB |
static int |
ENDTOT |
static int |
EXTCRC |
static java.lang.String |
EXTENSION
This is the File extension to be used for KAR files.
|
static int |
EXTHDR |
static int |
EXTLEN |
static long |
EXTSIG |
static int |
EXTSIZ |
static java.lang.String |
KAR_COMPLIANCE_DEFAULT
"relaxed" if you change this you should also change KARFILE_CONFIG_PROP_MODULE's configuration.xml
we need to keep both for users that started with an earlier version of configuration.xml
that lacks the KAR_COMPLIANCE_PROPERTY
|
static java.lang.String |
KAR_COMPLIANCE_PROPERTY_NAME
"KARComplianceMode"
|
static java.lang.String |
KAR_COMPLIANCE_RELAXED
"relaxed"
|
static java.lang.String |
KAR_COMPLIANCE_STRICT
"strict"
|
static java.lang.String |
KAR_CURRENT_VERSION_DEFAULT |
static java.lang.String |
KAR_CURRENT_VERSION_PROPERTY_NAME
"currentVersion" sub-element of karVersions
|
static java.util.jar.Attributes.Name |
KAR_VERSION
Name object for KAR-Version manifest attribute. |
static java.lang.String |
KAR_VERSION_200_NAMESPACE_DEFAULT |
static java.lang.String |
KAR_VERSION_200_RESOURCE_FILENAME_DEFAULT |
static java.lang.String |
KAR_VERSION_200_RESOURCEDIR_DEFAULT |
static java.lang.String |
KAR_VERSION_200_SCHEMAURL_DEFAULT |
static java.lang.String |
KAR_VERSION_200_VERSION_DEFAULT |
static java.lang.String |
KAR_VERSION_210_NAMESPACE_DEFAULT |
static java.lang.String |
KAR_VERSION_210_RESOURCE_FILENAME_DEFAULT |
static java.lang.String |
KAR_VERSION_210_RESOURCEDIR_DEFAULT |
static java.lang.String |
KAR_VERSION_210_SCHEMAURL_DEFAULT |
static java.lang.String |
KAR_VERSION_210_VERSION_DEFAULT |
static java.lang.String |
KAR_VERSION_NAMESPACE_PROPERTY_NAME
"namespace" sub-element of karVersion
|
static java.lang.String |
KAR_VERSION_PROPERTY_NAME
"karVersion" sub-element of karVersions
|
static java.lang.String |
KAR_VERSION_RESOURCE_FILENAME_PROPERTY_NAME
"resourceFileName" sub-element of karVersion
|
static java.lang.String |
KAR_VERSION_RESOURCEDIR_PROPERTY_NAME
"resourceDir" sub-element of karVersion
|
static java.lang.String |
KAR_VERSION_SCHEMAURL_PROPERTY_NAME
"schemaUrl" sub-element of karVersion
|
static java.lang.String |
KAR_VERSION_VERSION_PROPERTY_NAME
"version" sub-element of karVersion
|
static java.lang.String |
KAR_VERSIONS_PROPERTY_NAME
"karVersions"
|
static org.kepler.build.modules.Module |
KARFILE_CONFIG_PROP_MODULE
"core" Module
|
static int |
LOCCRC |
static int |
LOCEXT |
static int |
LOCFLG |
static int |
LOCHDR |
static int |
LOCHOW |
static int |
LOCLEN |
static int |
LOCNAM |
static long |
LOCSIG |
static int |
LOCSIZ |
static int |
LOCTIM |
static int |
LOCVER |
static java.util.jar.Attributes.Name |
LSID
Name object for lsid manifest attribute used
for globally identifying KAREntries as unique. |
static java.util.jar.Attributes.Name |
MOD_DEPEND
Name object for MOD_DEPEND manifest attribute. |
static java.util.jar.Attributes.Name |
OPENABLE
Name object for OPENABLE manifest attribute. |
static java.lang.String |
VERSION_1_0 |
static java.lang.String |
VERSION_2_0
Old versions still supported.
|
static java.lang.String |
VERSION_2_1
This is the current KAR version.
|
Constructor and Description |
---|
KARFile(java.io.File f)
Constructor for creating a KARFile from an existing file.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areAllModuleDependenciesSatisfied() |
void |
cacheKARContents()
This method makes sure that all of the entries of this KARFile are in the
Cache.
|
java.util.Set<KeplerLSID> |
getContainedLSIDs()
Return the LSIDs of all of the entries contained by this KARFile.
|
KeplerLSID[] |
getContentOfType(java.lang.String getType)
Return an array of lsids of a certain type from within this kar. if the
type is null return all of the lsids
|
java.lang.String |
getEntryName(KeplerLSID lsid) |
java.lang.String |
getEntryType(KeplerLSID lsid) |
java.io.File |
getFileLocation() |
java.util.zip.ZipEntry |
getKAREntry(KeplerLSID lsid)
returns a KAREntry for the given lsid.
|
static java.util.List<java.lang.String> |
getKARNamespaces() |
java.lang.String |
getKARVersion() |
static ConfigurationProperty |
getKARVersionsConfigProperty() |
java.lang.String |
getLocalRepoName()
Return the name of the local repository that this KAR is stored in.
|
KeplerLSID |
getLSID() |
java.util.Map<java.lang.String,org.kepler.build.util.Version> |
getMissingDependencies()
Get a map of missing module dependencies.
|
java.util.Vector<java.lang.String> |
getModuleDependencies() |
java.lang.String |
getPath()
Return the path where this kar file is found on disk.
|
static java.lang.String |
getResourceDir(java.lang.String namespace)
Return the local resource dir associated with given namespace,
null if can't be found.
|
static java.lang.String |
getResourceFileName(java.lang.String namespace)
Return the local resource filename associated with given namespace,
null if can't be found.
|
boolean |
isOpenable() |
static boolean |
isSubclass(java.lang.String getType,
java.lang.String type)
Determine if type is a subclass of getType.
|
java.util.List<KAREntry> |
karEntries()
Returns only valid KAREntries contained in this KARFile.
|
boolean |
open(KAREntry entry,
TableauFrame tableauFrame)
Call the open methods of all KAREntryHandlers that support the type of
the given entry.
|
boolean |
openKARContents(TableauFrame tableauFrame,
boolean forceOpen)
Here we go through all the KAREntries and call the open method of the
appropriate KAREntryHandlers.
|
void |
setLSID(KeplerLSID lsid) |
void |
setVersion(java.lang.String version)
Set the version of the KARFile.
|
public static final java.lang.String VERSION_2_1
public static final java.lang.String CURRENT_VERSION
public static final java.lang.String VERSION_2_0
public static final java.lang.String VERSION_1_0
public static final java.lang.String KAR_COMPLIANCE_STRICT
public static final java.lang.String KAR_COMPLIANCE_RELAXED
public static final java.lang.String KAR_COMPLIANCE_DEFAULT
public static final java.lang.String KAR_COMPLIANCE_PROPERTY_NAME
public static final org.kepler.build.modules.Module KARFILE_CONFIG_PROP_MODULE
public static final java.lang.String KAR_VERSIONS_PROPERTY_NAME
public static final java.lang.String KAR_CURRENT_VERSION_PROPERTY_NAME
public static final java.lang.String KAR_VERSION_PROPERTY_NAME
public static final java.lang.String KAR_VERSION_VERSION_PROPERTY_NAME
public static final java.lang.String KAR_VERSION_NAMESPACE_PROPERTY_NAME
public static final java.lang.String KAR_VERSION_SCHEMAURL_PROPERTY_NAME
public static final java.lang.String KAR_VERSION_RESOURCEDIR_PROPERTY_NAME
public static final java.lang.String KAR_VERSION_RESOURCE_FILENAME_PROPERTY_NAME
public static final java.lang.String KAR_CURRENT_VERSION_DEFAULT
public static final java.lang.String KAR_VERSION_200_RESOURCEDIR_DEFAULT
public static final java.lang.String KAR_VERSION_200_RESOURCE_FILENAME_DEFAULT
public static final java.lang.String KAR_VERSION_200_VERSION_DEFAULT
public static final java.lang.String KAR_VERSION_200_NAMESPACE_DEFAULT
public static final java.lang.String KAR_VERSION_200_SCHEMAURL_DEFAULT
public static final java.lang.String KAR_VERSION_210_RESOURCEDIR_DEFAULT
public static final java.lang.String KAR_VERSION_210_RESOURCE_FILENAME_DEFAULT
public static final java.lang.String KAR_VERSION_210_VERSION_DEFAULT
public static final java.lang.String KAR_VERSION_210_NAMESPACE_DEFAULT
public static final java.lang.String KAR_VERSION_210_SCHEMAURL_DEFAULT
public static final java.lang.String EXTENSION
public static final java.util.jar.Attributes.Name LSID
Name
object for lsid
manifest attribute used
for globally identifying KAREntries as unique.public static final java.util.jar.Attributes.Name KAR_VERSION
Name
object for KAR-Version
manifest attribute.
This attribute indicates the version number of the manifest standard to
which a KAR file's manifest conforms.public static final java.util.jar.Attributes.Name MOD_DEPEND
Name
object for MOD_DEPEND
manifest attribute.
This attribute indicates modules that are needed in order to open this
KAR file.public static final java.util.jar.Attributes.Name OPENABLE
Name
object for OPENABLE
manifest attribute.
This attribute indicates whether or not this KAR file is openable.public static final java.lang.String DEP_SEPARATOR
public static final long LOCSIG
public static final long EXTSIG
public static final long CENSIG
public static final long ENDSIG
public static final int LOCHDR
public static final int EXTHDR
public static final int CENHDR
public static final int ENDHDR
public static final int LOCVER
public static final int LOCFLG
public static final int LOCHOW
public static final int LOCTIM
public static final int LOCCRC
public static final int LOCSIZ
public static final int LOCLEN
public static final int LOCNAM
public static final int LOCEXT
public static final int EXTCRC
public static final int EXTSIZ
public static final int EXTLEN
public static final int CENVEM
public static final int CENVER
public static final int CENFLG
public static final int CENHOW
public static final int CENTIM
public static final int CENCRC
public static final int CENSIZ
public static final int CENLEN
public static final int CENNAM
public static final int CENEXT
public static final int CENCOM
public static final int CENDSK
public static final int CENATT
public static final int CENATX
public static final int CENOFF
public static final int ENDSUB
public static final int ENDTOT
public static final int ENDSIZ
public static final int ENDOFF
public static final int ENDCOM
public KARFile(java.io.File f) throws java.io.IOException
f
- the file to create the KAR fromjava.io.IOException
public KeplerLSID getLSID()
public void setLSID(KeplerLSID lsid) throws java.io.IOException
lsid
- java.io.IOException
public java.lang.String getKARVersion()
public boolean isOpenable()
public void setVersion(java.lang.String version) throws java.io.IOException
version
- java.io.IOException
- if the given version is not supportedpublic java.util.Vector<java.lang.String> getModuleDependencies()
public java.util.Set<KeplerLSID> getContainedLSIDs()
public java.lang.String getEntryType(KeplerLSID lsid)
public java.lang.String getEntryName(KeplerLSID lsid)
public java.lang.String getLocalRepoName()
public java.lang.String getPath()
public java.io.File getFileLocation()
public java.util.zip.ZipEntry getKAREntry(KeplerLSID lsid)
name
- the name of the entry to returnpublic java.util.List<KAREntry> karEntries()
public KeplerLSID[] getContentOfType(java.lang.String getType) throws java.lang.Exception
getType
- the type of the content to getjava.lang.Exception
public static boolean isSubclass(java.lang.String getType, java.lang.String type) throws java.lang.ClassNotFoundException
getType
- type
- java.lang.ClassNotFoundException
public void cacheKARContents() throws java.lang.Exception
java.lang.Exception
public boolean openKARContents(TableauFrame tableauFrame, boolean forceOpen) throws java.lang.Exception
tableauFrame
- forceOpen
- java.lang.Exception
public boolean open(KAREntry entry, TableauFrame tableauFrame)
entry
- tableauFrame
- public boolean areAllModuleDependenciesSatisfied()
public java.util.Map<java.lang.String,org.kepler.build.util.Version> getMissingDependencies()
public static ConfigurationProperty getKARVersionsConfigProperty()
public static java.util.List<java.lang.String> getKARNamespaces()
public static java.lang.String getResourceDir(java.lang.String namespace)
namespace
- public static java.lang.String getResourceFileName(java.lang.String namespace)
namespace
-