Interface NamespaceAware

All Known Subinterfaces:
Model
All Known Implementing Classes:
AbstractMemoryOverflowModel, 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 provide Namespace information, in addition to Statements.
Author:
Peter Ansell
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the namespace that is associated with the specified prefix, if any.
    Gets the set that contains the assigned namespaces.
  • Method Details

    • getNamespaces

      Set<Namespace> getNamespaces()
      Gets the set that contains the assigned namespaces.
      Returns:
      A Set containing the Namespace objects that are available.
    • 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.