Skip to content

Commit 4af6141

Browse files
committed
GH-5709: additional packages for vocabularies
1 parent ea2f9a4 commit 4af6141

18 files changed

Lines changed: 105 additions & 9 deletions

File tree

core/model-vocabulary-eu/src/main/java/org/eclipse/rdf4j/model/vocabulary/eu/Vocabularies.java renamed to core/model-api/src/main/java/org/eclipse/rdf4j/model/base/Vocabularies.java

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
* SPDX-License-Identifier: BSD-3-Clause
1010
*******************************************************************************/
1111

12-
package org.eclipse.rdf4j.model.vocabulary.eu;
12+
package org.eclipse.rdf4j.model.base;
1313

14+
import org.eclipse.rdf4j.common.annotation.InternalUseOnly;
1415
import org.eclipse.rdf4j.model.IRI;
1516
import org.eclipse.rdf4j.model.Namespace;
16-
import org.eclipse.rdf4j.model.base.AbstractNamespace;
17-
import org.eclipse.rdf4j.model.base.InternedIRI;
1817

1918
/**
2019
* Utility methods related to RDF vocabularies.
@@ -23,12 +22,20 @@
2322
* @implNote To be eventually removed or merged with {@code org.eclipse.rdf4j.model.util.Vocabularies}.
2423
* @since 3.5.0
2524
*/
26-
class Vocabularies {
25+
@InternalUseOnly
26+
public final class Vocabularies {
2727

2828
private Vocabularies() {
2929
}
3030

31-
static Namespace createNamespace(String prefix, String namespace) {
31+
/**
32+
* Create a new vocabulary namespace
33+
*
34+
* @param prefix prefix
35+
* @param namespace full namespace
36+
* @return
37+
*/
38+
public static Namespace createNamespace(String prefix, String namespace) {
3239
return new VocabularyNamespace(prefix, namespace);
3340
}
3441

@@ -54,7 +61,14 @@ public String getName() {
5461
}
5562
}
5663

57-
static IRI createIRI(String namespace, String localName) {
64+
/**
65+
* Create an (interned) IRI
66+
*
67+
* @param namespace
68+
* @param localName
69+
* @return
70+
*/
71+
public static IRI createIRI(String namespace, String localName) {
5872
return new InternedIRI(namespace, localName);
5973
}
6074

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>org.eclipse.rdf4j</groupId>
6+
<artifactId>rdf4j-core</artifactId>
7+
<version>6.0.0-SNAPSHOT</version>
8+
</parent>
9+
<artifactId>rdf4j-model-vocabulary-annotation</artifactId>
10+
<packaging>jar</packaging>
11+
<name>RDF4J: RDF Vocabularies Annotation</name>
12+
<description>Well-known RDF Vocabularies for annotations, feedback etc</description>
13+
<dependencies>
14+
<dependency>
15+
<groupId>${project.groupId}</groupId>
16+
<artifactId>rdf4j-model-api</artifactId>
17+
<version>${project.version}</version>
18+
</dependency>
19+
</dependencies>
20+
</project>

core/model-vocabulary/src/main/java/org/eclipse/rdf4j/model/vocabulary/DQV.java renamed to core/model-vocabulary-annotation/src/main/java/org/eclipse/rdf4j/model/vocabulary/annotation/DQV.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
* SPDX-License-Identifier: BSD-3-Clause
1010
*******************************************************************************/
1111

12-
package org.eclipse.rdf4j.model.vocabulary;
12+
package org.eclipse.rdf4j.model.vocabulary.annotation;
1313

1414
import org.eclipse.rdf4j.model.IRI;
1515
import org.eclipse.rdf4j.model.Namespace;
16+
import org.eclipse.rdf4j.model.base.Vocabularies;
1617

1718
/**
1819
* Constants for the Data Quality Vocabulary.

core/model-vocabulary/src/main/java/org/eclipse/rdf4j/model/vocabulary/OA.java renamed to core/model-vocabulary-annotation/src/main/java/org/eclipse/rdf4j/model/vocabulary/annotation/OA.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
* SPDX-License-Identifier: BSD-3-Clause
1010
*******************************************************************************/
1111

12-
package org.eclipse.rdf4j.model.vocabulary;
12+
package org.eclipse.rdf4j.model.vocabulary.annotation;
1313

1414
import org.eclipse.rdf4j.model.IRI;
1515
import org.eclipse.rdf4j.model.Namespace;
16+
import org.eclipse.rdf4j.model.base.Vocabularies;
1617

1718
/**
1819
* Constants for the Web Annotation Ontology.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2026 Eclipse RDF4J contributors.
3+
*
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Distribution License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/org/documents/edl-v10.php.
8+
*
9+
* SPDX-License-Identifier: BSD-3-Clause
10+
*******************************************************************************/
11+
/**
12+
* Re-usable constants for various well-known RDF vocabularies for annotations, feedback etc.
13+
*/
14+
package org.eclipse.rdf4j.model.vocabulary.annotation;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>org.eclipse.rdf4j</groupId>
6+
<artifactId>rdf4j-core</artifactId>
7+
<version>6.0.0-SNAPSHOT</version>
8+
</parent>
9+
<artifactId>rdf4j-model-vocabulary-biblio</artifactId>
10+
<packaging>jar</packaging>
11+
<name>RDF4J: RDF Vocabularies Biblio</name>
12+
<description>Well-known RDF Vocabularies for bibliographic references, citations etc</description>
13+
<dependencies>
14+
<dependency>
15+
<groupId>${project.groupId}</groupId>
16+
<artifactId>rdf4j-model-api</artifactId>
17+
<version>${project.version}</version>
18+
</dependency>
19+
</dependencies>
20+
</project>

core/model-vocabulary/src/main/java/org/eclipse/rdf4j/model/vocabulary/BIBO.java renamed to core/model-vocabulary-biblio/src/main/java/org/eclipse/rdf4j/model/vocabulary/biblio/BIBO.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
* SPDX-License-Identifier: BSD-3-Clause
1010
*******************************************************************************/
1111

12-
package org.eclipse.rdf4j.model.vocabulary;
12+
package org.eclipse.rdf4j.model.vocabulary.biblio;
1313

1414
import org.eclipse.rdf4j.model.IRI;
1515
import org.eclipse.rdf4j.model.Namespace;
16+
import org.eclipse.rdf4j.model.base.Vocabularies;
1617

1718
/**
1819
* Constants for the DCMI Bibliographic Ontology.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*******************************************************************************
2+
* Copyright (c) 2026 Eclipse RDF4J contributors.
3+
*
4+
* All rights reserved. This program and the accompanying materials
5+
* are made available under the terms of the Eclipse Distribution License v1.0
6+
* which accompanies this distribution, and is available at
7+
* http://www.eclipse.org/org/documents/edl-v10.php.
8+
*
9+
* SPDX-License-Identifier: BSD-3-Clause
10+
*******************************************************************************/
11+
/**
12+
* Re-usable constants for various well-known RDF vocabularies for bibliographic references, citations etc.
13+
*/
14+
package org.eclipse.rdf4j.model.vocabulary.biblio;

core/model-vocabulary-eu/src/main/java/org/eclipse/rdf4j/model/vocabulary/eu/ADMS.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import org.eclipse.rdf4j.model.IRI;
1515
import org.eclipse.rdf4j.model.Namespace;
16+
import org.eclipse.rdf4j.model.base.Vocabularies;
1617

1718
/**
1819
* Constants for the SEMIC Asset Description Metadata Schema.

core/model-vocabulary-eu/src/main/java/org/eclipse/rdf4j/model/vocabulary/eu/CPSV.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import org.eclipse.rdf4j.model.IRI;
1515
import org.eclipse.rdf4j.model.Namespace;
16+
import org.eclipse.rdf4j.model.base.Vocabularies;
1617

1718
/**
1819
* Constants for the SEMIC Core Public Service Vocabulary.

0 commit comments

Comments
 (0)