Package org.spdx.crossref
Class OsiApi
java.lang.Object
org.spdx.crossref.OsiApi
public class OsiApi extends Object
Singleton class that manages the OSI API to fetch license information
- Author:
- Gary O'Neall
-
Field Summary
Fields Modifier and Type Field Description static StringOSI_PREFIX -
Method Summary
Modifier and Type Method Description static OsiApigetInstance()booleanisApiAvailable()static booleanisOsiUrl(String url)voidsetCrossRefDetails(String url, org.spdx.library.model.license.SpdxListedLicense license, org.spdx.library.model.license.CrossRef crossRef)Sets the cross reference details for the cross ref givein the URL and license
-
Field Details
-
OSI_PREFIX
- See Also:
- Constant Field Values
-
-
Method Details
-
getInstance
-
isOsiUrl
-
isApiAvailable
public boolean isApiAvailable()- Returns:
- true if the API is available for queries
-
setCrossRefDetails
public void setCrossRefDetails(String url, org.spdx.library.model.license.SpdxListedLicense license, org.spdx.library.model.license.CrossRef crossRef) throws org.spdx.library.InvalidSPDXAnalysisExceptionSets the cross reference details for the cross ref givein the URL and license- Parameters:
url- URL reference to the OSI websitelicense- SPDX license containing the crossRefcrossRef- crossRef who's details are to be filled in- Throws:
org.spdx.library.InvalidSPDXAnalysisException
-