On 09/05/2023 12:56, Erich Bremer wrote:
Does anyone use this particular vocabulary for named graphs?
http://www.w3.org/2004/03/trix/rdfg-1/
Jena doesn't seem to have a convenience library for it like RDF and RDFS.
- Erich
There is nothing special or hard-wired about the vocabularies in Jena.
They are a set of defined terms in Java.
Some are produced with Jena's schemagen to generate the Java.
You can make/use your own.
Andy
schemagen -->
import org.apache.jena.rdf.model.*;
/**
* Vocabulary definitions from file:download.rdf
* @author Auto-generated by schemagen on 10 May 2023 09:02
*/
public class Download {
/** <p>The RDF model that holds the vocabulary terms</p> */
private static final Model M_MODEL = ModelFactory.createDefaultModel();
/** <p>The namespace of the vocabulary as a string</p> */
public static final String NS =
"http://www.w3.org/2004/03/trix/rdfg-1/";
/** <p>The namespace of the vocabulary as a string</p>
* @return namespace as String
* @see #NS */
public static String getURI() {return NS;}
/** <p>The namespace of the vocabulary as a resource</p> */
public static final Resource NAMESPACE = M_MODEL.createResource( NS );
/** <p>The graphs associated with the subject and object are
equivalent.</p> */
public static final Property equivalentGraph =
M_MODEL.createProperty(
"http://www.w3.org/2004/03/trix/rdfg-1/equivalentGraph" );
/** <p>The graph associated with the subject is a subgraph of a
graph equivalent
* to that associated with the object.</p>
*/
public static final Property subGraphOf = M_MODEL.createProperty(
"http://www.w3.org/2004/03/trix/rdfg-1/subGraphOf" );
}