public class NpmPackage extends Object
| Constructor and Description |
|---|
NpmPackage(com.google.gson.JsonObject npm,
Map<String,byte[]> content,
List<String> folders) |
NpmPackage(String path) |
| Modifier and Type | Method and Description |
|---|---|
String |
canonical() |
List<String> |
copyTo(String folder,
String dest)
Copies all the files in the package folder [folder] to the nominated dest,
and returns a list of all the file names copied
|
String |
description() |
String |
fhirVersion()
convenience method for getting the package fhir version
|
static NpmPackage |
fromZip(InputStream stream,
boolean dropRootFolder) |
IniFile |
getCache() |
com.google.gson.JsonObject |
getNpm()
Handle to the package json file
|
String |
getPath() |
String |
getWebLocation() |
boolean |
isType(PackageGenerator.PackageType template) |
List<String> |
list(String folder)
Accessing the contents of the package - get a list of files in a subfolder of the package
|
InputStream |
load(String folder,
String file)
get a stream that contains the contents of one of the files in a folder
|
String |
name()
convenience method for getting the package name
|
void |
setPath(String path)
only for use by the package manager itself
|
String |
type() |
String |
version()
convenience method for getting the package version
|
public NpmPackage(com.google.gson.JsonObject npm, Map<String,byte[]> content, List<String> folders)
public NpmPackage(String path) throws IOException
IOExceptionpublic static NpmPackage fromZip(InputStream stream, boolean dropRootFolder) throws IOException
IOExceptionpublic List<String> list(String folder) throws IOException
folder - IOExceptionpublic List<String> copyTo(String folder, String dest) throws IOException
folder - IOExceptionpublic InputStream load(String folder, String file) throws IOException
folder - file - IOExceptionpublic com.google.gson.JsonObject getNpm()
public String fhirVersion()
public String description()
public boolean isType(PackageGenerator.PackageType template)
public void setPath(String path)
path - public String getWebLocation()
Copyright © 2014–2019 University Health Network. All rights reserved.