Package org.eclipse.rdf4j.model
Interface NamespaceAware
-
- All Known Subinterfaces:
Model
- All Known Implementing Classes:
AbstractModel
,DynamicModel
,EmptyModel
,FilteredModel
,LinkedHashModel
,SailModel
,TreeModel
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface NamespaceAware
An interface that is used to signify that something is able to provideNamespace
information, in addition toStatement
s.- Author:
- Peter Ansell
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Optional<Namespace>
getNamespace(String prefix)
Gets the namespace that is associated with the specified prefix, if any.Set<Namespace>
getNamespaces()
Gets the set that contains the assigned namespaces.
-
-
-
Method Detail
-
getNamespace
default Optional<Namespace> getNamespace(String prefix)
Gets the namespace that is associated with the specified prefix, if any. If multiple namespaces match the given prefix, the result may not be consistent over successive calls to this method.- Parameters:
prefix
- A namespace prefix.- Returns:
- The namespace name that is associated with the specified prefix, or
Optional.empty()
if there is no such namespace.
-
-