* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ package org.spdx.tag; diff --git a/src/main/java/org/spdx/tag/CommonCode.java b/src/main/java/org/spdx/tag/CommonCode.java index d76d26a..38b1a7e 100644 --- a/src/main/java/org/spdx/tag/CommonCode.java +++ b/src/main/java/org/spdx/tag/CommonCode.java @@ -1,33 +1,21 @@ /** - - * Copyright (c) 2010 Source Auditor Inc. - - * - + * SPDX-FileContributor: Rana Rahal, Protecode Inc. + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2015 Source Auditor Inc. + * SPDX-FileType: SOURCE + * SPDX-License-Identifier: Apache-2.0 + *
* Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - - * - - * http://www.apache.org/licenses/LICENSE-2.0 - - * - + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - - * - */ package org.spdx.tag; diff --git a/src/main/java/org/spdx/tag/HandBuiltParser.java b/src/main/java/org/spdx/tag/HandBuiltParser.java index 724ec05..42f7682 100644 --- a/src/main/java/org/spdx/tag/HandBuiltParser.java +++ b/src/main/java/org/spdx/tag/HandBuiltParser.java @@ -1,19 +1,21 @@ /** - * Copyright (c) 2013 Source Auditor Inc. - * + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2013 Source Auditor Inc. + * SPDX-FileType: SOURCE + * SPDX-License-Identifier: Apache-2.0 + *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
-*/
+ */
package org.spdx.tag;
import java.util.regex.Matcher;
@@ -23,11 +25,11 @@
* I'm hoping this is a temporary solution. This is a hand built parser to parse
* SPDX tag files. It replaces the current ANTL based parser which has a defect
* where any lines starting with a text ending with a : is treated as a tag even
- * if it is in <text> </text>
.
*
- * The interface is similar to the generated ANTLR code
- * @author Gary O'Neall
+ * The interface is similar to the generated ANTLR code.
*
+ * @author Gary O'Neall
*/
public class HandBuiltParser {
diff --git a/src/main/java/org/spdx/tag/InvalidFileFormatException.java b/src/main/java/org/spdx/tag/InvalidFileFormatException.java
index c1a21fb..9bd6d40 100644
--- a/src/main/java/org/spdx/tag/InvalidFileFormatException.java
+++ b/src/main/java/org/spdx/tag/InvalidFileFormatException.java
@@ -1,19 +1,22 @@
/**
- * Copyright (c) 2017 Source Auditor Inc.
- *
+ * SPDX-FileContributor: Rohit Lodha
+ * SPDX-FileContributor: Gary O'Neall
+ * SPDX-FileCopyrightText: Copyright (c) 2017 Source Auditor Inc.
+ * SPDX-FileType: SOURCE
+ * SPDX-License-Identifier: Apache-2.0
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * -*/ + */ package org.spdx.tag; import org.spdx.core.InvalidSPDXAnalysisException; @@ -22,7 +25,6 @@ * Exceptions for invalid SPDX file format * * @author Rohit Lodha - * */ public class InvalidFileFormatException extends InvalidSPDXAnalysisException { diff --git a/src/main/java/org/spdx/tag/InvalidSpdxTagFileException.java b/src/main/java/org/spdx/tag/InvalidSpdxTagFileException.java index 097bb1d..e4f781e 100644 --- a/src/main/java/org/spdx/tag/InvalidSpdxTagFileException.java +++ b/src/main/java/org/spdx/tag/InvalidSpdxTagFileException.java @@ -1,19 +1,21 @@ /** - * Copyright (c) 2012 Source Auditor Inc. - * + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2012 Source Auditor Inc. + * SPDX-FileType: SOURCE + * SPDX-License-Identifier: Apache-2.0 + *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * -*/ + */ package org.spdx.tag; import org.spdx.core.InvalidSPDXAnalysisException; @@ -22,7 +24,6 @@ * Exceptions for errors in a SPDX tag format file * * @author Gary O'Neall - * */ public class InvalidSpdxTagFileException extends InvalidSPDXAnalysisException { diff --git a/src/main/java/org/spdx/tag/NoCommentInputStream.java b/src/main/java/org/spdx/tag/NoCommentInputStream.java index 8506282..c3b7075 100644 --- a/src/main/java/org/spdx/tag/NoCommentInputStream.java +++ b/src/main/java/org/spdx/tag/NoCommentInputStream.java @@ -1,19 +1,21 @@ /** - * Copyright (c) 2013 Source Auditor Inc. - * + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2013 Source Auditor Inc. + * SPDX-FileType: SOURCE + * SPDX-License-Identifier: Apache-2.0 + *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
-*/
+ */
package org.spdx.tag;
import java.io.BufferedReader;
@@ -25,12 +27,11 @@
import org.slf4j.LoggerFactory;
/**
- * @author Gary O'Neall
- *
* Input stream which filters out any SPDX tag/value comments
* Any new line which begins with a # is skipped until the end of line except
- * if it is within a <text> </text>
wrapper.
*
+ * @author Gary O'Neall
*/
public class NoCommentInputStream extends InputStream {
diff --git a/src/main/java/org/spdx/tag/RecognitionException.java b/src/main/java/org/spdx/tag/RecognitionException.java
index ce84243..38f111d 100644
--- a/src/main/java/org/spdx/tag/RecognitionException.java
+++ b/src/main/java/org/spdx/tag/RecognitionException.java
@@ -1,21 +1,20 @@
/**
- * Copyright (c) 2020 Source Auditor Inc.
- *
+ * SPDX-FileContributor: Gary O'Neall
+ * SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
+ * SPDX-FileType: SOURCE
* SPDX-License-Identifier: Apache-2.0
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
*/
package org.spdx.tag;
@@ -24,7 +23,6 @@
/**
* Parser/Scanner recognition errors
* @author Gary O'Neall
- *
*/
public class RecognitionException extends InvalidSPDXAnalysisException {
diff --git a/src/main/java/org/spdx/tag/SpdxTagValueConstants.properties b/src/main/java/org/spdx/tag/SpdxTagValueConstants.properties
index 328a664..83cbb1f 100644
--- a/src/main/java/org/spdx/tag/SpdxTagValueConstants.properties
+++ b/src/main/java/org/spdx/tag/SpdxTagValueConstants.properties
@@ -1,5 +1,8 @@
-#
-# Copyright (c) 2011 Source Auditor Inc.
+# SPDX-FileContributor: Rana Rahal, Protecode Inc.
+# SPDX-FileContributor: Gary O'Neall
+# SPDX-FileCopyrightText: Copyright (c) 2011 Source Auditor Inc.
+# SPDX-FileType: SOURCE
+# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -12,12 +15,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-#
-#
-# @author Rana Rahal, Protecode Inc.
-
-
# File Headers
CREATION_INFO_HEADER=## Creation Information
REVIEW_INFO_HEADER=## Review Information
@@ -53,20 +51,20 @@ PROP_PROJECT_NAME=ArtifactOfProjectName:
PROP_PROJECT_HOMEPAGE=ArtifactOfProjectHomePage:
PROP_PROJECT_URI=ArtifactOfProjectURI:
-#SPDX Document Properties
+# SPDX Document Properties
PROP_SPDX_VERSION=SPDXVersion:
PROP_SPDX_DATA_LICENSE=DataLicense:
PROP_SPDX_COMMENT=DocumentComment:
PROP_DOCUMENT_NAME=DocumentName:
PROP_DOCUMENT_NAMESPACE=DocumentNamespace:
-#SPDX CreationInfo Properties
+# SPDX CreationInfo Properties
PROP_CREATION_CREATOR=Creator:
PROP_CREATION_CREATED=Created:
PROP_CREATION_COMMENT=CreatorComment:
PROP_LICENSE_LIST_VERSION = LicenseListVersion:
-#SPDX Package Properties
+# SPDX Package Properties
PROP_PACKAGE_DECLARED_NAME=PackageName:
PROP_PACKAGE_COMMENT=PackageComment:
PROP_PACKAGE_FILE_NAME=PackageFileName:
@@ -94,7 +92,7 @@ PROP_PACKAGE_BUILT_DATE=BuiltDate:
PROP_PACKAGE_RELEASE_DATE=ReleaseDate:
PROP_PACKAGE_VALID_UNTIL_DATE=ValidUntilDate:
-#SPDX License Properties
+# SPDX License Properties
PROP_LICENSE_ID=LicenseID:
PROP_LICENSE_TEXT=licenseText:
PROP_EXTRACTED_TEXT=ExtractedText:
@@ -102,7 +100,7 @@ PROP_LICENSE_COMMENT=LicenseComment:
PROP_LICENSE_NAME=LicenseName:
PROP_SOURCE_URLS=LicenseCrossReference:
-#SPDX File Properties
+# SPDX File Properties
PROP_FILE_NAME=FileName:
PROP_FILE_TYPE=FileType:
PROP_FILE_LICENSE=LicenseConcluded:
@@ -128,11 +126,11 @@ PROP_SNIPPET_COMMENT=SnippetComment:
PROP_SNIPPET_NAME=SnippetName:
PROP_SNIPPET_SEEN_LICENSE=LicenseInfoInSnippet:
-#SPDX Review Properties
+# SPDX Review Properties
PROP_REVIEW_REVIEWER=Reviewer:
PROP_REVIEW_DATE=ReviewDate:
PROP_REVIEW_COMMENT=ReviewComment:
-#Text wrapper for multi-line text
+# Text wrapper for multi-line text
PROP_BEGIN_TEXT=
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * */ package org.spdx.tag; diff --git a/src/main/java/org/spdx/tag/package-info.java b/src/main/java/org/spdx/tag/package-info.java index 638de0f..ec39e05 100644 --- a/src/main/java/org/spdx/tag/package-info.java +++ b/src/main/java/org/spdx/tag/package-info.java @@ -1,9 +1,25 @@ /** - * + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc. + * SPDX-FileType: SOURCE + * SPDX-License-Identifier: Apache-2.0 + *
+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ + /** - * @author Gary O'Neall - * * Package to support the SPDX tag/value format + * + * @author Gary O'Neall */ -package org.spdx.tag; \ No newline at end of file +package org.spdx.tag; diff --git a/src/main/java/org/spdx/tagvaluestore/TagValueStore.java b/src/main/java/org/spdx/tagvaluestore/TagValueStore.java index 5aed9d2..dcbbc01 100644 --- a/src/main/java/org/spdx/tagvaluestore/TagValueStore.java +++ b/src/main/java/org/spdx/tagvaluestore/TagValueStore.java @@ -1,21 +1,20 @@ /** - * Copyright (c) 2020 Source Auditor Inc. - * + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc. + * SPDX-FileType: SOURCE * SPDX-License-Identifier: Apache-2.0 - * + *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 */ package org.spdx.tagvaluestore; @@ -54,7 +53,6 @@ * SPDX Store implementing serializers and deserializers for the Tag/Value format * * @author Gary O'Neall - * */ public class TagValueStore extends ExtendedSpdxStore implements ISerializableModelStore { diff --git a/src/main/java/org/spdx/tagvaluestore/package-info.java b/src/main/java/org/spdx/tagvaluestore/package-info.java new file mode 100644 index 0000000..c609eb0 --- /dev/null +++ b/src/main/java/org/spdx/tagvaluestore/package-info.java @@ -0,0 +1,25 @@ +/** + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2025 Source Auditor Inc. + * SPDX-FileType: SOURCE + * SPDX-License-Identifier: Apache-2.0 + *
+ * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Package to support the SPDX tag/value store + * + * @author Gary O'Neall + */ +package org.spdx.tagvaluestore; diff --git a/src/test/java/org/spdx/tag/NoCommentInputStreamTest.java b/src/test/java/org/spdx/tag/NoCommentInputStreamTest.java index 0c7cede..ee6072b 100644 --- a/src/test/java/org/spdx/tag/NoCommentInputStreamTest.java +++ b/src/test/java/org/spdx/tag/NoCommentInputStreamTest.java @@ -1,26 +1,26 @@ /** - * Copyright (c) 2013 Source Auditor Inc. - * + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2013 Source Auditor Inc. + * SPDX-FileType: SOURCE + * SPDX-License-Identifier: Apache-2.0 + *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * -*/ + */ package org.spdx.tag; import java.io.ByteArrayInputStream; import java.io.IOException; -import org.spdx.tag.NoCommentInputStream; - import junit.framework.TestCase; public class NoCommentInputStreamTest extends TestCase { diff --git a/src/test/java/org/spdx/tag/TestBuildDocument.java b/src/test/java/org/spdx/tag/TestBuildDocument.java index 02881f0..c77d92d 100644 --- a/src/test/java/org/spdx/tag/TestBuildDocument.java +++ b/src/test/java/org/spdx/tag/TestBuildDocument.java @@ -1,19 +1,21 @@ /** - * Copyright (c) 2016 Source Auditor Inc. - * + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2016 Source Auditor Inc. + * SPDX-FileType: SOURCE + * SPDX-License-Identifier: Apache-2.0 + *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * -*/ + */ package org.spdx.tag; import java.io.ByteArrayInputStream; @@ -59,7 +61,6 @@ /** * @author Gary O'Neall - * */ public class TestBuildDocument extends TestCase { diff --git a/src/test/java/org/spdx/tagvaluestore/TagValueStoreTest.java b/src/test/java/org/spdx/tagvaluestore/TagValueStoreTest.java index 4c37faf..81049dc 100644 --- a/src/test/java/org/spdx/tagvaluestore/TagValueStoreTest.java +++ b/src/test/java/org/spdx/tagvaluestore/TagValueStoreTest.java @@ -1,21 +1,20 @@ /** - * Copyright (c) 2020 Source Auditor Inc. - * + * SPDX-FileContributor: Gary O'Neall + * SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc. + * SPDX-FileType: SOURCE * SPDX-License-Identifier: Apache-2.0 - * + *
* Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * + *
+ * https://www.apache.org/licenses/LICENSE-2.0 + *
* Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 */ package org.spdx.tagvaluestore; @@ -49,7 +48,6 @@ /** * @author Gary O'Neall - * */ public class TagValueStoreTest extends TestCase {