Search in sources :

Example 1 with PackageClient

use of org.hl7.fhir.utilities.npm.PackageClient in project org.hl7.fhir.core by hapifhir.

the class PackageVisitor method visitPackages.

public void visitPackages() throws IOException, ParserConfigurationException, SAXException {
    System.out.println("Finding packages");
    pc = new PackageClient(PackageClient.PRIMARY_SERVER);
    pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
    Set<String> pidList = getAllPackages();
    System.out.println("Go: " + pidList.size() + " packages");
    for (String pid : pidList) {
        List<String> vList = listVersions(pid);
        if (oldVersions) {
            for (String v : vList) {
                processPackage(pid, v);
            }
        } else if (vList.isEmpty()) {
            System.out.println("No Packages for " + pid);
        } else {
            processPackage(pid, vList.get(vList.size() - 1));
        }
    }
}
Also used : FilesystemPackageCacheManager(org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager) PackageClient(org.hl7.fhir.utilities.npm.PackageClient)

Aggregations

FilesystemPackageCacheManager (org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager)1 PackageClient (org.hl7.fhir.utilities.npm.PackageClient)1