|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xoe.core.packages.XoePackage
Represents a XOE package in memory. Used to access the file archive during installation and to store and retrieve references to runtime components (classloaders, services, resources, etc...).
Constructor Summary | |
XoePackage(InputStream stream)
Creates a XoePackage from an InputStream |
|
XoePackage(InputStream stream,
String name)
Creates a XoePackage from an InputStream and specifies the name of the file the stream was created from. |
|
XoePackage(String file)
Creates a XoePackage from a local file path |
|
XoePackage(URL url)
Creates a XoePackage from an URL |
|
XoePackage(ZipInputStream stream)
Creates a XoePackage from a ZipInputStream |
|
XoePackage(ZipInputStream stream,
String name)
Creates a XoePackage from a ZipInputStream and specifies the name of the file the stream was created from. |
Method Summary | |
void |
forgetArchive()
Removes all references to the original XOE archive. |
String |
getArchitecture()
Get the architecture this package was built for |
PackageDescription |
getDescription()
Retrieve the package description that was found in the XOE archive |
Object |
getExData(Object key)
Retrieve stored data associated with the specified key |
InputStream |
getInputStream()
Same as getZipInputStream but cast to InputStream |
String |
getName()
Gets the package name listed in the package description |
static XoePackage |
getPackage(Class c)
Given a class c return the xoe package which provided it. |
String |
getPackageURI()
Gets the package URI built from the name, version, and architecture listed in the package description |
Proviso[] |
getProvides()
Retrieves all the provisos listed in the package description |
org.w3c.dom.Document |
getSpec()
Get the DOM representation of the package description |
PackageVersion |
getVersion()
Gets the package version listed in the package description |
ZipInputStream |
getZipInputStream()
Retrieves a ZipInputStream that can be used to access the contents of the XOE archive |
void |
performQuery(IPackageQuery in_q,
Vector out_res)
Performs the specified query and adds all matching packages to out_results |
void |
setExData(Object key,
Object value)
Store data associated with the package. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public XoePackage(String file) throws InvalidPackageException, IOException
file
- a local file path. Behavior is undefined if the path is
relative.InvalidPackageException
- if the package cannot be parsed or the
description is not understoodIOException
- if an IO error occurs while accessing the filepublic XoePackage(URL url) throws InvalidPackageException, IOException
url
- The URL of a .xoe fileInvalidPackageException
- if the package cannot be parsed or the
description is not understoodIOException
- if an IO error occurs while accessing the filepublic XoePackage(InputStream stream) throws InvalidPackageException, IOException
stream
- An input stream from which to read a ZIP fileInvalidPackageException
- if the package cannot be parsed or the
description is not understoodIOException
- if an IO error occurs while accessing the streampublic XoePackage(InputStream stream, String name) throws InvalidPackageException, IOException
stream
- An input stream from which to read a ZIP filename
- A string identifying the resource from which the stream was created.InvalidPackageException
- if the package cannot be parsed or the
description is not understoodIOException
- if an IO error occurs while accessing the streampublic XoePackage(ZipInputStream stream) throws InvalidPackageException
stream
- A ZipInputStream from which to access the contents of a ZIP ArchiveInvalidPackageException
- if the package cannot be parsed or the
description is not understoodIOException
- if an IO error occurs while accessing the streampublic XoePackage(ZipInputStream stream, String name)
stream
- A ZipInputStream from which to access the contents of a ZIP Archivename
- A string identifying the resource from which the stream was created.InvalidPackageException
- if the package cannot be parsed or the
description is not understoodIOException
- if an IO error occurs while accessing the streamMethod Detail |
public String toString()
toString
in class Object
public void setExData(Object key, Object value)
value
is null any data already stored with the
key is removed.key
- the key to be used for lookupvalue
- the data to storepublic Object getExData(Object key)
public PackageDescription getDescription()
public String getArchitecture()
public org.w3c.dom.Document getSpec()
public void forgetArchive()
public ZipInputStream getZipInputStream()
public InputStream getInputStream()
public String getName()
public String getPackageURI()
public PackageVersion getVersion()
public void performQuery(IPackageQuery in_q, Vector out_res)
IPackageQueryHandler
out_results
performQuery
in interface IPackageQueryHandler
public Proviso[] getProvides()
public static XoePackage getPackage(Class c)
c
return the xoe package which provided it.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |