Interface EnumeratedClass

All Superinterfaces:
FrontsNode, OntClass, OntResource, RDFNode, Resource
All Known Implementing Classes:
EnumeratedClassImpl

public interface EnumeratedClass extends OntClass

Encapsulates a class description representing a closed enumeration of individuals.

  • Method Details

    • setOneOf

      void setOneOf(RDFList en)

      Assert that this class is exactly the enumeration of the given individuals. Any existing statements for oneOf will be removed.

      Parameters:
      en - A list of individuals that defines the class extension for this class
      Throws:
      ProfileException - If the Profile.ONE_OF() property is not supported in the current language profile.
    • addOneOf

      void addOneOf(Resource res)

      Add an individual to the enumeration that defines the class extension of this class.

      Parameters:
      res - An individual to add to the enumeration
      Throws:
      ProfileException - If the Profile.ONE_OF() property is not supported in the current language profile.
    • addOneOf

      void addOneOf(Iterator<? extends Resource> individuals)

      Add each individual from the given iteration to the enumeration that defines the class extension of this class.

      Parameters:
      individuals - An iterator over individuals
      Throws:
      ProfileException - If the Profile.ONE_OF() property is not supported in the current language profile.
    • getOneOf

      RDFList getOneOf()

      Answer a list of individuals that defines the extension of this class.

      Returns:
      A list of individuals that is the class extension
      Throws:
      ProfileException - If the Profile.ONE_OF() property is not supported in the current language profile.
    • listOneOf

      ExtendedIterator<? extends OntResource> listOneOf()

      Answer an iterator over all of the individuals that are declared to be the class extension for this class. Each element of the iterator will be an OntResource.

      Returns:
      An iterator over the individuals in the class extension
      Throws:
      ProfileException - If the Profile.ONE_OF() property is not supported in the current language profile.
    • hasOneOf

      boolean hasOneOf(Resource res)

      Answer true if the given individual is one of the enumerated individuals in the class extension of this class.

      Parameters:
      res - An individual to test
      Returns:
      True if the given individual is in the class extension for this class.
      Throws:
      ProfileException - If the Profile.ONE_OF() property is not supported in the current language profile.
    • removeOneOf

      void removeOneOf(Resource res)

      Remove the statement that this enumeration includes res among its members. If this statement is not true of the current model, nothing happens.

      Parameters:
      res - A resource that may be declared to be part of this enumeration, and which is no longer one of the enumeration values.