|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xoe.core.packages.PackageDescription
Encapsulation of an XML package description
Constructor Summary | |
PackageDescription(org.w3c.dom.Document pkgDoc)
Builds a PackageDescription out of a DOM Document |
|
PackageDescription(InputStream is)
Reads an XML file from an InputStream and builds a PackageDescription out of it |
Method Summary | |
void |
checkCompleteInSet(IPackageQueryHandler qHandler)
Throws an exception if any packages in the set conflict with this one, or if this package has dependencies that are not met by the set. |
boolean |
equals(PackageDescription desc)
Compares objects by their unique identifier strings. |
String |
getArchitecture()
Gets the architecture the described package was built for |
IPackageQuery[] |
getConflicts()
Returns an array of IPackageQuery objects representing packages that conflict with this one |
Vector |
getConflictsInSet(IPackageQueryHandler qHandler)
Returns a vector containing all packages that conflict with this one in the set represented by the specified IPackageQueryHandler |
String |
getCopyrightHolder()
Get the copyright holder name listed in the info section of the description. |
String |
getCopyrightYear()
Get returns the year that the package was copyrighted |
IPackageQuery[] |
getDependencies()
Returns an array of package queries representing packages upon which this one depends |
org.w3c.dom.Document |
getDocument()
Get a DOM representation of this package description. |
String |
getFriendlyName()
Gets the name listed in the info section of the description. |
String |
getMaintainerEmail()
Get the maintainer email listed in the info section of the description. |
String |
getMaintainerName()
Get the maintainer name listed in the info section of the description. |
String |
getName()
Get the unique name of this package |
String |
getPackageURI()
m_arch is null for non-native packages. |
static String |
getPackageURI(String packageName,
String arch,
String version)
Determines the package URI for a package with the specified name, architecture (null if non-native), and version |
IPackageQuery[] |
getPredependencies()
Returns an array of package queries representing packages upon which this one predepends |
static long |
getQueryTime()
|
URL |
getSuggestedURL()
Returns the first URL listed from which the .xoe archive for this package can be retrieved |
String |
getTextDescription()
Return the textual description of this package with no XHTML markup |
Vector |
getUnmetDependenciesInSet(IPackageQueryHandler qHandler)
Returns a vector of IPackageQuery objects representing dependencies of this package that were not met in the set of packages represented by the specified IPackageQueryHandler |
IPackageQuery |
getUpgradeQuery()
Builds an IPackageQuery object that will exclusively match all packages that are upgrades to this one |
String |
getVendor()
Get the vendor name listed in the info section of the description. |
PackageVersion |
getVersion()
Get the version of this package |
org.w3c.dom.Element |
getXHTMLDescription()
Return the textual description of this package. |
String |
getXoeFilename()
Generate the filename for the package based on its name, version and arch. |
static String |
getXoeFilename(String packageName,
String arch,
String version)
find out what the name of a package 'packageName', with version 'version', would be (if it were compiled for 'arch'). |
static PackageDescription |
newest(PackageDescription p1,
PackageDescription p2)
Return the newer of two packages. |
static PackageDescription |
newest(Vector pkgs)
Return the newest out of a Vector of PackageDescriptions. |
void |
performQuery(IPackageQuery in_q,
Vector out_res)
Performs the specified query and adds all matching packages to out_results |
static void |
resetQueryTime()
|
void |
setArchitecture(String arch)
Sets the architecture flag in the package. |
void |
setSize(long size)
Add a notation indicating the size of the XOE archive file for this package |
void |
setSuggestedURL(String url)
Add an URL from which this package can be retrieved |
String |
toString()
A more readable identifier of the package |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PackageDescription(org.w3c.dom.Document pkgDoc) throws PackageDescriptionException
PackageDescriptionException
- if the Document is not a valid package descriptionpublic PackageDescription(InputStream is) throws IOException, PackageDescriptionException
PackageDescriptionException
- if the stream does not contain a valid
package descriptionMethod Detail |
public static void resetQueryTime()
public static long getQueryTime()
public IPackageQuery getUpgradeQuery()
public void performQuery(IPackageQuery in_q, Vector out_res)
IPackageQueryHandler
out_results
performQuery
in interface IPackageQueryHandler
public Vector getConflictsInSet(IPackageQueryHandler qHandler)
public Vector getUnmetDependenciesInSet(IPackageQueryHandler qHandler)
public void checkCompleteInSet(IPackageQueryHandler qHandler) throws PackageIncompleteException
PackageIncompleteException
- Thrown if this package has any conflicts
or unmet dependencies in the set.public IPackageQuery[] getConflicts()
public void setSuggestedURL(String url)
public void setSize(long size)
size
- the size, in bytes of the XOE archive filepublic IPackageQuery[] getPredependencies()
public IPackageQuery[] getDependencies()
public String getArchitecture()
public void setArchitecture(String arch)
public String getFriendlyName()
public String getVendor()
public String getMaintainerName()
public String getMaintainerEmail()
public String getCopyrightYear()
public String getCopyrightHolder()
public String getName()
public PackageVersion getVersion()
public org.w3c.dom.Document getDocument()
public String getTextDescription()
public org.w3c.dom.Element getXHTMLDescription()
public URL getSuggestedURL()
public String toString()
toString
in class Object
public String getXoeFilename()
public String getPackageURI()
public boolean equals(PackageDescription desc)
public static PackageDescription newest(PackageDescription p1, PackageDescription p2)
public static PackageDescription newest(Vector pkgs)
public static String getXoeFilename(String packageName, String arch, String version)
public static String getPackageURI(String packageName, String arch, String version)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |