Skip to content

Commit 3aa7f27

Browse files
bactgoneall
authored andcommitted
Update and add missing header and Javadoc
- Convert copyright info in header to SPDX FileTag format - Add missing license info header - author "gary" -> "Gary O'Neall" - Add few missing Javadoc for methods and classes Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
1 parent 48329b6 commit 3aa7f27

36 files changed

+149
-147
lines changed

src/main/java/org/spdx/spdxRdfStore/CompatibilityUpgrader.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright (c) 2020 Source Auditor Inc.
3-
* <p>
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
44
* SPDX-License-Identifier: Apache-2.0
55
* <p>
66
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -48,7 +48,6 @@
4848
/**
4949
* Updates the RDF model for compatibility with the current version of the spec
5050
* @author Gary O'Neall
51-
*
5251
*/
5352
public class CompatibilityUpgrader {
5453

src/main/java/org/spdx/spdxRdfStore/MissingDataTypeAndClassRestriction.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/**
2-
* Copyright (c) 2020 Source Auditor Inc.
3-
*
4-
* <p>
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
54
* SPDX-License-Identifier: Apache-2.0
65
* <p>
76
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,7 +21,6 @@
2221
* Exceptions related to missing restrictions in the SPDX OWL ontology
2322
*
2423
* @author Gary O'Neall
25-
*
2624
*/
2725
public class MissingDataTypeAndClassRestriction extends SpdxRdfException {
2826

src/main/java/org/spdx/spdxRdfStore/OutputFormat.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright (c) 2020 Source Auditor Inc.
3-
* <p>
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
44
* SPDX-License-Identifier: Apache-2.0
55
* <p>
66
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -19,8 +19,7 @@
1919

2020
/**
2121
* Formats supported for serializing RDF
22-
*
23-
*
22+
*
2423
* @author Gary O'Neall
2524
*/
2625
public enum OutputFormat {

src/main/java/org/spdx/spdxRdfStore/RdfSpdxModelManager.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright (c) 2020 Source Auditor Inc.
3-
* <p>
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
44
* SPDX-License-Identifier: Apache-2.0
55
* <p>
66
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -85,7 +85,6 @@
8585
* If a URI type, the ID namespace is either the listed license namespace or the document URI.
8686
*
8787
* @author Gary O'Neall
88-
*
8988
*/
9089
@SuppressWarnings("LoggingSimilarMessage")
9190
public class RdfSpdxModelManager implements IModelStoreLock {
@@ -102,12 +101,22 @@ public class RdfSpdxModelManager implements IModelStoreLock {
102101
* subset of the listed license namespace to be used for matching
103102
*/
104103
private static final CharSequence SPDX_LISTED_LICENSE_SUBPREFIX = "://spdx.org/licenses/";
105-
104+
105+
/**
106+
* An iterator for traversing RDF list objects associated with a specific property of a resource
107+
*/
106108
public class RdfListIterator implements Iterator<Object> {
107-
109+
108110
final NodeIterator listIterator;
109111
private final Property property;
110112

113+
/**
114+
* Constructs an RdfListIterator for a given resource and property
115+
*
116+
* @param idResource the resource whose property values are to be iterated
117+
* @param property the property whose values are to be iterated
118+
* @throws NullPointerException if idResource or property is null
119+
*/
111120
public RdfListIterator(Resource idResource, Property property) {
112121
Objects.requireNonNull(idResource, "ID resource can not be null");
113122
Objects.requireNonNull(property, "Property resource can not be null");

src/main/java/org/spdx/spdxRdfStore/RdfStore.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright (c) 2020 Source Auditor Inc.
3-
* <p>
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
44
* SPDX-License-Identifier: Apache-2.0
55
* <p>
66
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -57,7 +57,6 @@
5757
* Model Store implemented using RDF
5858
*
5959
* @author Gary O'Neall
60-
*
6160
*/
6261
@SuppressWarnings("LoggingSimilarMessage")
6362
public class RdfStore implements IModelStore, ISerializableModelStore {

src/main/java/org/spdx/spdxRdfStore/SpdxOwlOntology.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright (c) 2020 Source Auditor Inc.
3-
* <p>
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
44
* SPDX-License-Identifier: Apache-2.0
55
* <p>
66
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -45,7 +45,6 @@
4545
* Singleton class to manage the OWL ontology
4646
*
4747
* @author Gary O'Neall
48-
*
4948
*/
5049
@SuppressWarnings("LoggingSimilarMessage")
5150
public class SpdxOwlOntology {

src/main/java/org/spdx/spdxRdfStore/SpdxRdfException.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright (c) 2020 Source Auditor Inc.
3-
* <p>
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
44
* SPDX-License-Identifier: Apache-2.0
55
* <p>
66
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,7 +23,6 @@
2323
* Exceptions related to RDF storage of SPDX documents
2424
*
2525
* @author Gary O'Neall
26-
*
2726
*/
2827
public class SpdxRdfException extends InvalidSPDXAnalysisException {
2928

src/main/java/org/spdx/spdxRdfStore/SpdxResourceFactory.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Copyright (c) 2020 Source Auditor Inc.
3-
* <p>
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
44
* SPDX-License-Identifier: Apache-2.0
55
* <p>
66
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,7 +15,6 @@
1515
* See the License for the specific language governing permissions and
1616
* limitations under the License.
1717
*/
18-
1918
package org.spdx.spdxRdfStore;
2019

2120
import java.util.Objects;
@@ -67,9 +66,13 @@ public static Resource typeToResource(String type) {
6766
return ResourceFactory.createResource(SpdxConstantsCompatV2.SPDX_NAMESPACE + type);
6867
}
6968
}
70-
69+
7170
/**
72-
* @return URI for the type or className
71+
* Converts a class name to its corresponding URI
72+
*
73+
* @param className the name of the class to convert to a URI
74+
* @return the URI for the type or the class name
75+
* @throws NullPointerException if the className is null
7376
*/
7477
public static String classNameToUri(String className) {
7578
Objects.requireNonNull(className);

src/test/java/org/spdx/library/model/compat/v2/AnnotationTest.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
package org.spdx.library.model.compat.v2;
21
/**
3-
* Copyright (c) 2019 Source Auditor Inc.
4-
*
2+
* SPDX-FileCopyrightText: Copyright (c) 2019 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
54
* SPDX-License-Identifier: Apache-2.0
65
*
76
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,7 +15,7 @@
1615
* See the License for the specific language governing permissions and
1716
* limitations under the License.
1817
*/
19-
18+
package org.spdx.library.model.compat.v2;
2019

2120
import java.text.DateFormat;
2221
import java.text.SimpleDateFormat;
@@ -37,8 +36,7 @@
3736
import junit.framework.TestCase;
3837

3938
/**
40-
* @author gary
41-
*
39+
* @author Gary O'Neall
4240
*/
4341
public class AnnotationTest extends TestCase {
4442

src/test/java/org/spdx/library/model/compat/v2/ByteOffsetPointerTest.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
package org.spdx.library.model.compat.v2;
21
/**
3-
* Copyright (c) 2020 Source Auditor Inc.
4-
*
2+
* SPDX-FileCopyrightText: Copyright (c) 2020 Source Auditor Inc.
3+
* SPDX-FileType: SOURCE
54
* SPDX-License-Identifier: Apache-2.0
65
*
76
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,7 +15,7 @@
1615
* See the License for the specific language governing permissions and
1716
* limitations under the License.
1817
*/
19-
18+
package org.spdx.library.model.compat.v2;
2019

2120
import java.util.List;
2221

@@ -35,8 +34,7 @@
3534
import junit.framework.TestCase;
3635

3736
/**
38-
* @author gary
39-
*
37+
* @author Gary O'Neall
4038
*/
4139
public class ByteOffsetPointerTest extends TestCase {
4240

0 commit comments

Comments
 (0)