@@ -65,11 +65,11 @@ public class RdfStore implements IModelStore, ISerializableModelStore {
6565 static final Logger logger = LoggerFactory .getLogger (RdfStore .class .getName ());
6666
6767 static final String GENERATED = "gnrtd" ;
68- static Pattern DOCUMENT_ID_PATTERN_GENERATED = Pattern .compile (SpdxConstantsCompatV2 .EXTERNAL_DOC_REF_PRENUM +GENERATED +"(\\ d+)$" );
69- static Pattern SPDX_ID_PATTERN_GENERATED = Pattern .compile (SpdxConstantsCompatV2 .SPDX_ELEMENT_REF_PRENUM +GENERATED +"(\\ d+)$" );
70- static Pattern LICENSE_ID_PATTERN_GENERATED = Pattern .compile (SpdxConstantsCompatV2 .NON_STD_LICENSE_ID_PRENUM +GENERATED +"(\\ d+)$" );
68+ static final Pattern DOCUMENT_ID_PATTERN_GENERATED = Pattern .compile (SpdxConstantsCompatV2 .EXTERNAL_DOC_REF_PRENUM +GENERATED +"(\\ d+)$" );
69+ static final Pattern SPDX_ID_PATTERN_GENERATED = Pattern .compile (SpdxConstantsCompatV2 .SPDX_ELEMENT_REF_PRENUM +GENERATED +"(\\ d+)$" );
70+ static final Pattern LICENSE_ID_PATTERN_GENERATED = Pattern .compile (SpdxConstantsCompatV2 .NON_STD_LICENSE_ID_PRENUM +GENERATED +"(\\ d+)$" );
7171 static final String ANON_PREFIX = "__anon__" ;
72- static Pattern ANON_ID_PATTERN = Pattern .compile (ANON_PREFIX +"(.+)$" );
72+ static final Pattern ANON_ID_PATTERN = Pattern .compile (ANON_PREFIX +"(.+)$" );
7373 RdfSpdxModelManager modelManager ;
7474 String documentUri ;
7575 boolean dontStoreLicenseDetails = false ;
@@ -84,10 +84,9 @@ public class RdfStore implements IModelStore, ISerializableModelStore {
8484 * Create an RDF store and initialize it with an SPDX document deserialized from stream
8585 * Note that the stream must contain one and only one SPDX document in SPDX version 2.X format
8686 * @param stream input stream of a model
87- * @throws IOException on IO error
8887 * @throws InvalidSPDXAnalysisException on SPDX parsing errors
8988 */
90- public RdfStore (InputStream stream ) throws InvalidSPDXAnalysisException , IOException {
89+ public RdfStore (InputStream stream ) throws InvalidSPDXAnalysisException {
9190 deSerialize (stream , false );
9291 }
9392
@@ -100,13 +99,12 @@ public RdfStore() {
10099 }
101100
102101 /**
103- * Create an RDF store and initialize it with an data deserialized from stream using the documentUri
102+ * Create an RDF store and initialize it with a data deserialized from stream using the documentUri
104103 * for ID prefixes
105104 * @param stream stream of an RDF model
106- * @throws IOException on IO error
107105 * @throws InvalidSPDXAnalysisException on SPDX parsing errors
108106 */
109- public RdfStore (InputStream stream , String documentUri ) throws InvalidSPDXAnalysisException , IOException {
107+ public RdfStore (InputStream stream , String documentUri ) throws InvalidSPDXAnalysisException {
110108 this .documentUri = documentUri ;
111109 deSerialize (stream , false , documentUri );
112110 }
@@ -222,7 +220,7 @@ public IdType getIdType(String objectUri) {
222220 id = CompatibleModelStoreWrapper .objectUriToId (false , objectUri , documentUri );
223221 } catch (InvalidSPDXAnalysisException e ) {
224222 logger .warn ("Error converting object URI to ID for URI: {}" , objectUri , e );
225- return IdType .Unkown ;
223+ return IdType .Unknown ;
226224 }
227225 if (SpdxConstantsCompatV2 .LICENSE_ID_PATTERN .matcher (id ).matches ()) {
228226 return IdType .LicenseRef ;
@@ -233,7 +231,7 @@ public IdType getIdType(String objectUri) {
233231 if (SpdxConstantsCompatV2 .SPDX_ELEMENT_REF_PATTERN .matcher (id ).matches ()) {
234232 return IdType .SpdxId ;
235233 }
236- return IdType .Unkown ;
234+ return IdType .Unknown ;
237235 }
238236
239237 /* (non-Javadoc)
@@ -645,7 +643,7 @@ public void deSerialize(InputStream stream, boolean overwrite, String documentNa
645643 }
646644
647645 @ Override
648- public Optional <String > getCaseSensisitiveId (String documentUri , String caseInsensisitiveId ) {
646+ public Optional <String > getCaseSensitiveId (String documentUri , String caseInsensisitiveId ) {
649647 if (Objects .isNull (modelManager )) {
650648 return Optional .empty ();
651649 }
@@ -675,7 +673,7 @@ public void delete(String objectUri) throws InvalidSPDXAnalysisException {
675673 }
676674
677675 @ Override
678- public void close () throws Exception {
676+ public void close () {
679677 if (Objects .nonNull (modelManager )) {
680678 modelManager .close ();
681679 modelManager = null ;
0 commit comments