Package org.eclipse.rdf4j.model
Interface Namespace
-
- All Superinterfaces:
java.lang.Comparable<Namespace>
,java.io.Serializable
- All Known Implementing Classes:
AbstractNamespace
,ModelNamespace
,SimpleNamespace
,Vocabularies.VocabularyNamespace
public interface Namespace extends java.io.Serializable, java.lang.Comparable<Namespace>
A namespace, consisting of a namespace name and a prefix that has been assigned to it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Compares this namespace to another object.java.lang.String
getName()
Gets the name of the current namespace (i.e.java.lang.String
getPrefix()
Gets the prefix of the current namespace.int
hashCode()
Computes the hash code of this namespace.
-
-
-
Method Detail
-
getPrefix
java.lang.String getPrefix()
Gets the prefix of the current namespace. The default namespace is represented by an empty prefix string.- Returns:
- prefix of namespace, or an empty string in case of the default namespace.
-
getName
java.lang.String getName()
Gets the name of the current namespace (i.e. its IRI).- Returns:
- name of namespace
-
equals
boolean equals(java.lang.Object o)
Compares this namespace to another object.
-
hashCode
int hashCode()
Computes the hash code of this namespace.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code for this namespace computed as
Objects.hash
(getPrefix()
,getName()
)
-
-