Package org.hl7.fhir.utilities.npm
Class PackageClient
- java.lang.Object
-
- org.hl7.fhir.utilities.npm.PackageClient
-
public class PackageClient extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringPRIMARY_SERVERstatic StringSECONDARY_SERVER
-
Constructor Summary
Constructors Constructor Description PackageClient(String address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists(String id, String ver)InputStreamfetch(String id, String ver)InputStreamfetch(PackageInfo info)InputStreamfetchCached(String url)InputStreamfetchNpm(String id, String ver)voidfindDependents(Set<String> list, String id)protected Stringfn(String url)StringgetLatestVersion(String id)StringgetLatestVersion(String id, String specVersion)DategetNewPackages(Date lastCalled, List<PackageInfo> updates)protected PackageInfogetPackageInfoFromJSON(JsonObject o, String name, String canonical, String fhirVersion)List<PackageInfo>getVersions(String id)List<PackageInfo>listFromRegistry(String name, String canonical, String fhirVersion)List<PackageInfo>search(String name, String canonical, String fhirVersion, boolean preRelease)Stringurl(String id, String v)
-
-
-
Field Detail
-
PRIMARY_SERVER
public static final String PRIMARY_SERVER
- See Also:
- Constant Field Values
-
SECONDARY_SERVER
public static final String SECONDARY_SERVER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PackageClient
public PackageClient(String address)
-
-
Method Detail
-
exists
public boolean exists(String id, String ver) throws IOException
- Throws:
IOException
-
fetch
public InputStream fetch(String id, String ver) throws IOException
- Throws:
IOException
-
fetch
public InputStream fetch(PackageInfo info) throws IOException
- Throws:
IOException
-
fetchNpm
public InputStream fetchNpm(String id, String ver) throws IOException
- Throws:
IOException
-
fetchCached
public InputStream fetchCached(String url) throws IOException, FileNotFoundException
- Throws:
IOExceptionFileNotFoundException
-
getVersions
public List<PackageInfo> getVersions(String id) throws IOException
- Throws:
IOException
-
search
public List<PackageInfo> search(String name, String canonical, String fhirVersion, boolean preRelease) throws IOException
- Throws:
IOException
-
getNewPackages
public Date getNewPackages(Date lastCalled, List<PackageInfo> updates)
-
getLatestVersion
public String getLatestVersion(String id) throws IOException
- Throws:
IOException
-
getLatestVersion
public String getLatestVersion(String id, String specVersion) throws IOException
- Throws:
IOException
-
getPackageInfoFromJSON
protected PackageInfo getPackageInfoFromJSON(JsonObject o, String name, String canonical, String fhirVersion)
-
listFromRegistry
public List<PackageInfo> listFromRegistry(String name, String canonical, String fhirVersion) throws IOException
- Throws:
IOException
-
findDependents
public void findDependents(Set<String> list, String id)
-
-