Skip to content

Commit 6a1de45

Browse files
Remove rdf4j-generator-maven-plugin dependency (#719)
* cherry-pick fix: remove rdf4j-generator (#715) * fix: remove rdf4j-generator * fix: checkstyle warnings on DATACITE,FDP, R3D generate classes and remove SCHEMAORG * cherry-pick: Clean up vocabulary classes (#717) * remove unused WebAccessControl vocabulary * rename vocabulary.Sio to SIO and use util.ValueFactoryHelper.i for consistency * remove unused terms from DATACITE vocabulary and refactor for consistency * remove unused terms from R3D vocabulary and refactor for consistency * remove unused terms from FDP vocabulary and refactor for consistency --------- Co-authored-by: Patrick Dekker <168626347+PatrickDekkerHealthRI@users.noreply.github.com>
1 parent 33b17e1 commit 6a1de45

File tree

7 files changed

+124
-107
lines changed

7 files changed

+124
-107
lines changed

pom.xml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
<plugin.coveralls.version>4.3.0</plugin.coveralls.version>
7272
<plugin.javax_xml_bind.version>2.3.1</plugin.javax_xml_bind.version>
7373
<plugin.git_commit_id.version>9.0.2</plugin.git_commit_id.version>
74-
<plugin.rdf4j_generator.version>0.2.0</plugin.rdf4j_generator.version>
7574
<plugin.checkstyle.version>3.6.0</plugin.checkstyle.version>
7675
<plugin.spotbugs.version>4.9.3.0</plugin.spotbugs.version>
7776
</properties>
@@ -382,41 +381,6 @@
382381
</excludes>
383382
</configuration>
384383
</plugin>
385-
<plugin>
386-
<groupId>com.github.kburger</groupId>
387-
<artifactId>rdf4j-generator-maven-plugin</artifactId>
388-
<version>${plugin.rdf4j_generator.version}</version>
389-
<executions>
390-
<execution>
391-
<goals>
392-
<goal>generate</goal>
393-
</goals>
394-
</execution>
395-
</executions>
396-
<configuration>
397-
<package>org.fairdatapoint.vocabulary</package>
398-
<addGeneratedAnnotation>false</addGeneratedAnnotation>
399-
<vocabularies>
400-
<vocabulary>
401-
<url>https://sparontologies.github.io/datacite/current/datacite.ttl</url>
402-
<prefix>datacite</prefix>
403-
</vocabulary>
404-
<vocabulary>
405-
<url>https://raw.githubusercontent.com/re3data/ontology/master/r3dOntology.ttl</url>
406-
</vocabulary>
407-
<vocabulary>
408-
<url>https://raw.githubusercontent.com/FAIRDataTeam/FDP-O/v1.1/fdp-ontology.owl</url>
409-
<namespace>https://w3id.org/fdp/fdp-o#</namespace>
410-
<prefix>fdp</prefix>
411-
</vocabulary>
412-
<vocabulary>
413-
<url>https://raw.githubusercontent.com/schemaorg/schemaorg/main/data/releases/3.4/schema.ttl</url>
414-
<namespace>http://schema.org/</namespace>
415-
<prefix>schemaOrg</prefix>
416-
</vocabulary>
417-
</vocabularies>
418-
</configuration>
419-
</plugin>
420384
</plugins>
421385
</build>
422386
</project>

src/main/java/org/fairdatapoint/entity/metadata/MetadataSetter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import org.fairdatapoint.vocabulary.DCAT3;
2626
import org.fairdatapoint.vocabulary.FDP;
27-
import org.fairdatapoint.vocabulary.Sio;
27+
import org.fairdatapoint.vocabulary.SIO;
2828
import org.eclipse.rdf4j.model.IRI;
2929
import org.eclipse.rdf4j.model.Literal;
3030
import org.eclipse.rdf4j.model.Model;
@@ -122,12 +122,12 @@ public static void setPublisher(Model metadata, IRI uri, Agent publisher) {
122122
}
123123

124124
public static void setMetrics(Model metadata, IRI uri, List<Metric> metrics) {
125-
metadata.remove(null, Sio.IS_ABOUT, null);
126-
metadata.remove(null, Sio.REFERS_TO, null);
125+
metadata.remove(null, SIO.IS_ABOUT, null);
126+
metadata.remove(null, SIO.REFERS_TO, null);
127127
metrics.forEach(metric -> {
128-
metadata.add(uri, Sio.REFERS_TO, metric.getUri());
129-
metadata.add(metric.getUri(), Sio.IS_ABOUT, metric.getMetricType());
130-
metadata.add(metric.getUri(), Sio.REFERS_TO, metric.getValue());
128+
metadata.add(uri, SIO.REFERS_TO, metric.getUri());
129+
metadata.add(metric.getUri(), SIO.IS_ABOUT, metric.getMetricType());
130+
metadata.add(metric.getUri(), SIO.REFERS_TO, metric.getValue());
131131
});
132132
}
133133

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* The MIT License
3+
* Copyright © 2016-2024 FAIR Data Team
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
22+
*/
23+
package org.fairdatapoint.vocabulary;
24+
25+
import org.eclipse.rdf4j.model.IRI;
26+
27+
import static org.fairdatapoint.util.ValueFactoryHelper.i;
28+
29+
public final class DATACITE {
30+
public static final String NAMESPACE = "http://purl.org/spar/datacite/";
31+
32+
public static final IRI IDENTIFIER = i(NAMESPACE + "Identifier");
33+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* The MIT License
3+
* Copyright © 2016-2024 FAIR Data Team
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
22+
*/
23+
package org.fairdatapoint.vocabulary;
24+
25+
import org.eclipse.rdf4j.model.IRI;
26+
27+
import static org.fairdatapoint.util.ValueFactoryHelper.i;
28+
29+
public final class FDP {
30+
31+
public static final String NAMESPACE = "https://w3id.org/fdp/fdp-o#";
32+
33+
public static final IRI FAIRDATAPOINT = i(NAMESPACE + "FAIRDataPoint");
34+
public static final IRI FDPSOFTWAREVERSION = i(NAMESPACE + "fdpSoftwareVersion");
35+
public static final IRI METADATACATALOG = i(NAMESPACE + "metadataCatalog");
36+
public static final IRI METADATAIDENTIFIER = i(NAMESPACE + "metadataIdentifier");
37+
public static final IRI METADATAISSUED = i(NAMESPACE + "metadataIssued");
38+
public static final IRI METADATAMODIFIED = i(NAMESPACE + "metadataModified");
39+
public static final IRI METADATASERVICE = i(NAMESPACE + "MetadataService");
40+
41+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/**
2+
* The MIT License
3+
* Copyright © 2016-2024 FAIR Data Team
4+
*
5+
* Permission is hereby granted, free of charge, to any person obtaining a copy
6+
* of this software and associated documentation files (the "Software"), to deal
7+
* in the Software without restriction, including without limitation the rights
8+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
* copies of the Software, and to permit persons to whom the Software is
10+
* furnished to do so, subject to the following conditions:
11+
*
12+
* The above copyright notice and this permission notice shall be included in
13+
* all copies or substantial portions of the Software.
14+
*
15+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
* THE SOFTWARE.
22+
*/
23+
package org.fairdatapoint.vocabulary;
24+
25+
import org.eclipse.rdf4j.model.IRI;
26+
27+
import static org.fairdatapoint.util.ValueFactoryHelper.i;
28+
29+
public final class R3D {
30+
31+
public static final String NAMESPACE = "http://www.re3data.org/schema/3-0#";
32+
33+
public static final IRI COUNTRY = i(NAMESPACE + "country");
34+
public static final IRI DATACATALOG = i(NAMESPACE + "dataCatalog");
35+
public static final IRI REPOSITORY = i(NAMESPACE + "Repository");
36+
public static final IRI REPOSITORYIDENTIFIER = i(NAMESPACE + "repositoryIdentifier");
37+
38+
}

src/main/java/org/fairdatapoint/vocabulary/Sio.java renamed to src/main/java/org/fairdatapoint/vocabulary/SIO.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
package org.fairdatapoint.vocabulary;
2929

3030
import org.eclipse.rdf4j.model.IRI;
31-
import org.eclipse.rdf4j.model.ValueFactory;
32-
import org.eclipse.rdf4j.model.impl.SimpleValueFactory;
31+
32+
import static org.fairdatapoint.util.ValueFactoryHelper.i;
3333

3434
/**
3535
* Semanticscience Integrated Ontology
@@ -40,12 +40,11 @@
4040
* @version 0.1
4141
* @since 2018-01-17
4242
*/
43-
public class Sio {
43+
public class SIO {
4444

45-
public static final ValueFactory VF = SimpleValueFactory.getInstance();
46-
public static final String PREFIX = "sio";
4745
public static final String NAMESPACE = "http://semanticscience.org/resource/";
48-
public static final IRI REFERS_TO = VF.createIRI(NAMESPACE + "SIO_000628");
49-
public static final IRI IS_ABOUT = VF.createIRI(NAMESPACE + "SIO_000332");
46+
47+
public static final IRI IS_ABOUT = i(NAMESPACE + "SIO_000332");
48+
public static final IRI REFERS_TO = i(NAMESPACE + "SIO_000628");
5049

5150
}

src/main/java/org/fairdatapoint/vocabulary/WebAccessControl.java

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)