public class PackageLibrary
extends java.lang.Object
Constructor and Description |
---|
PackageLibrary() |
Modifier and Type | Method and Description |
---|---|
void |
addPackage(java.lang.String name,
StylesheetPackage packageIn)
Add a package to the current library with the given name
|
StylesheetPackage |
getPackage(java.lang.String name)
Return the latest version of a package of the given name from the library.
|
StylesheetPackage |
getPackage(java.lang.String name,
PackageVersionRanges ranges)
Return the first package from the library that has the given name and whose version lies in the given ranges
|
int |
size(java.lang.String name) |
public void addPackage(java.lang.String name, StylesheetPackage packageIn)
Packages which have the same name and version to one already within the library are considered to be duplicates and are not added.
name
- The name to use for this packagepackageIn
- The stylesheet package to be addedpublic StylesheetPackage getPackage(java.lang.String name, PackageVersionRanges ranges)
name
- The name of the packageranges
- The ranges of versions of that package that are acceptablepublic StylesheetPackage getPackage(java.lang.String name)
The definition of 'latest' is determined by partial ordering of the PackageVersion
class
name
- The name of the package to be returnedpublic int size(java.lang.String name)
Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.