public class SPDXLicenseInfoFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_LICENSE_LIST_VERSION |
static String |
NOASSERTION_LICENSE_NAME |
static String |
NONE_LICENSE_NAME |
static String |
STANDARD_LICENSE_URI_PREFIX |
| Constructor and Description |
|---|
SPDXLicenseInfoFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected static SPDXStandardLicense |
getLicenseFromStdLicModel(String uri) |
static SPDXLicenseInfo |
getLicenseInfoFromModel(com.hp.hpl.jena.rdf.model.Model model,
com.hp.hpl.jena.graph.Node node)
Create the appropriate SPDXLicenseInfo from the model and node provided.
|
static String |
getLicenseListVersion() |
static SPDXStandardLicense |
getStandardLicenseById(String licenseId) |
static String[] |
getStandardLicenseIds() |
static boolean |
isStandardLicenseID(String licenseID) |
static SPDXLicenseInfo |
parseSPDXLicenseString(String licenseString)
Parses a license string and converts it into a SPDXLicenseInfo object
Syntax - A license set must start and end with a parenthesis "("
A conjunctive license set will have and AND after the first
licenseInfo term
A disjunctive license set will have an OR after the first
licenseInfo term
If there is no And or Or, then it is converted to a simple
license type (standard or non-standard)
A space or tab must be used between license ID's and the
keywords AND and OR
A licenseID must NOT be "AND" or "OR"
|
public static final String DEFAULT_LICENSE_LIST_VERSION
public static final String NOASSERTION_LICENSE_NAME
public static final String NONE_LICENSE_NAME
public static final String STANDARD_LICENSE_URI_PREFIX
public static SPDXLicenseInfo getLicenseInfoFromModel(com.hp.hpl.jena.rdf.model.Model model, com.hp.hpl.jena.graph.Node node) throws InvalidSPDXAnalysisException
model - node - InvalidSPDXAnalysisExceptionpublic static SPDXStandardLicense getStandardLicenseById(String licenseId) throws InvalidSPDXAnalysisException
InvalidSPDXAnalysisExceptionprotected static SPDXStandardLicense getLicenseFromStdLicModel(String uri) throws InvalidSPDXAnalysisException
uri - InvalidSPDXAnalysisExceptionpublic static SPDXLicenseInfo parseSPDXLicenseString(String licenseString) throws InvalidLicenseStringException
licenseString - String conforming to the syntaxInvalidLicenseStringExceptionpublic static boolean isStandardLicenseID(String licenseID)
licenseID - InvalidSPDXAnalysisExceptionpublic static String[] getStandardLicenseIds()
public static String getLicenseListVersion()
Copyright © 2014 Linux Foundation. All Rights Reserved.