public abstract class Vocabulary extends Object
| Constructor and Description |
|---|
Vocabulary(String namespace)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected org.eclipse.rdf4j.model.IRI |
createClass(String namespace,
String resource)
Creates a resource and register it to the
classes map. |
protected org.eclipse.rdf4j.model.IRI |
createIRI(String iriStr)
Creates a IRI.
|
protected org.eclipse.rdf4j.model.IRI |
createProperty(String namespace,
String property)
Creates a property and register it to the
properties map. |
org.eclipse.rdf4j.model.IRI |
getClass(String name)
Returns a class defined within this vocabulary.
|
org.eclipse.rdf4j.model.IRI[] |
getClasses() |
String |
getCommentFor(org.eclipse.rdf4j.model.IRI resource)
Returns the comment for the given resource.
|
Map<org.eclipse.rdf4j.model.IRI,String> |
getComments()
Returns all the defined comments for resources.
|
org.eclipse.rdf4j.model.IRI |
getNamespace() |
org.eclipse.rdf4j.model.IRI[] |
getProperties() |
org.eclipse.rdf4j.model.IRI |
getProperty(String name)
Returns a property defined within this vocabulary.
|
org.eclipse.rdf4j.model.IRI |
getProperty(String name,
org.eclipse.rdf4j.model.IRI defaultValue)
Returns a property defined within this vocabulary, if not found the
defaultValue will be returned. |
org.eclipse.rdf4j.model.IRI |
getPropertyCamelCase(String property)
Returns the property IRI for the specified property string.
|
public Vocabulary(String namespace)
namespace - the namespace IRI prefix.public org.eclipse.rdf4j.model.IRI getNamespace()
public org.eclipse.rdf4j.model.IRI getClass(String name)
name - class name.public org.eclipse.rdf4j.model.IRI getProperty(String name)
name - property name.public org.eclipse.rdf4j.model.IRI getProperty(String name, org.eclipse.rdf4j.model.IRI defaultValue)
defaultValue will be returned.name - property name.defaultValue - the default value if property name not found.public org.eclipse.rdf4j.model.IRI getPropertyCamelCase(String property)
property - property name.public org.eclipse.rdf4j.model.IRI[] getClasses()
public org.eclipse.rdf4j.model.IRI[] getProperties()
public Map<org.eclipse.rdf4j.model.IRI,String> getComments()
public String getCommentFor(org.eclipse.rdf4j.model.IRI resource)
resource - input resource to have a comment.protected org.eclipse.rdf4j.model.IRI createIRI(String iriStr)
iriStr - the IRI stringprotected org.eclipse.rdf4j.model.IRI createClass(String namespace, String resource)
classes map.namespace - vocabulary namespace.resource - name of the resource.protected org.eclipse.rdf4j.model.IRI createProperty(String namespace, String property)
properties map.namespace - vocabulary namespace.property - name of the property.Copyright © 2010–2019 The Apache Software Foundation. All rights reserved.