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 provide `Namespace` information, in addition to `Statement`s.
  Author:
    Peter Ansell

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and 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

    - #### 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.

Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.