Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.ontology
Interface AllDifferent

All Superinterfaces:
  FrontsNode, OntResource, RDFNode, Resource

    public interface AllDifferent

extends OntResource

Interface defining an individual in which all members of a collection are declared pair-wise disjoint. This allows ontologies that wish to support the unique names assumption to add this condition in languages (like OWL) that do not make the same assumption, with a minimum number of statements. Instances of the all different axiom are expected to have a property (e.g. `owl:distinctMembers` defining the list of distinct individuals in the ontology. For a given vocabulary, this will be defined by the distinctMembers entry.

Version:
  CVS $Id: AllDifferent.java,v 1.17 2008/01/02 12:06:41 andy_seaborne Exp $
Author:
  Ian Dickinson, HP Labs (email)

Method Summary
`void` | `addDistinctMember(Resource res)` Add the given individual to the list of distinct members of this AllDifferent declaration.
`void` | `addDistinctMembers(java.util.Iterator individuals)` Add the given individuals to the list of distinct members of this AllDifferent declaration.
`RDFList` | `getDistinctMembers()` Answer the list of distinct members for this AllDifferent declaration.
`boolean` | `hasDistinctMember(Resource res)` Answer true if this AllDifferent declaration includes `res` as one of the distinct individuals.
`ExtendedIterator` | `listDistinctMembers()` Answer an iterator over all of the individuals that are declared to be distinct by this AllDifferent declaration.
`void` | `removeDistinctMember(Resource res)` Remove the given resource from the list of distinct individuals.
`void` | `setDistinctMembers(RDFList members)` Assert that the list of distinct individuals in this AllDifferent declaration is the given list.

Methods inherited from interface com.hp.hpl.jena.ontology.OntResource
`addComment, addComment, addDifferentFrom, addIsDefinedBy, addLabel, addLabel, addRDFType, addSameAs, addSeeAlso, addVersionInfo, asAllDifferent, asAnnotationProperty, asClass, asDataRange, asDatatypeProperty, asIndividual, asObjectProperty, asOntology, asProperty, getCardinality, getComment, getDifferentFrom, getIsDefinedBy, getLabel, getOntModel, getProfile, getPropertyValue, getRDFType, getRDFType, getSameAs, getSeeAlso, getVersionInfo, hasComment, hasComment, hasLabel, hasLabel, hasRDFType, hasRDFType, hasRDFType, hasSeeAlso, hasVersionInfo, isAllDifferent, isAnnotationProperty, isClass, isDataRange, isDatatypeProperty, isDefinedBy, isDifferentFrom, isIndividual, isObjectProperty, isOntLanguageTerm, isOntology, isProperty, isSameAs, listComments, listDifferentFrom, listIsDefinedBy, listLabels, listPropertyValues, listRDFTypes, listSameAs, listSeeAlso, listVersionInfo, remove, removeComment, removeComment, removeDefinedBy, removeDifferentFrom, removeLabel, removeLabel, removeProperty, removeRDFType, removeSameAs, removeSeeAlso, removeVersionInfo, setComment, setDifferentFrom, setIsDefinedBy, setLabel, setPropertyValue, setRDFType, setSameAs, setSeeAlso, setVersionInfo`

Methods inherited from interface com.hp.hpl.jena.rdf.model.Resource
`abort, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addLiteral, addProperty, addProperty, addProperty, addProperty, begin, commit, equals, getId, getLocalName, getModel, getNameSpace, getNode, getProperty, getRequiredProperty, getURI, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasLiteral, hasProperty, hasProperty, hasProperty, hasProperty, hasURI, listProperties, listProperties, removeAll, removeProperties, toString`

Methods inherited from interface com.hp.hpl.jena.rdf.model.RDFNode
`as, canAs, inModel, isAnon, isLiteral, isResource, isURIResource, visitWith`

Methods inherited from interface com.hp.hpl.jena.graph.FrontsNode
`asNode`

Method Detail

### setDistinctMembers

    void setDistinctMembers(RDFList members)

  Assert that the list of distinct individuals in this AllDifferent declaration is the given list. Any existing statements for `distinctMembers` will be removed.

  Parameters:
    `members` - A list of the members that are declared to be distinct.
  Throws:
    `OntProfileException` - If the `Profile.DISTINCT_MEMBERS()` property is not supported in the current language profile.

### addDistinctMember

    void addDistinctMember(Resource res)

  Add the given individual to the list of distinct members of this AllDifferent declaration.

  Parameters:
    `res` - A resource that will be added to the list of all different members.
  Throws:
    `OntProfileException` - If the `Profile.DISTINCT_MEMBERS()` property is not supported in the current language profile.

### addDistinctMembers

    void addDistinctMembers(java.util.Iterator individuals)

  Add the given individuals to the list of distinct members of this AllDifferent declaration.

  Parameters:
    `individuals` - An iterator over the distinct invididuals that will be added
  Throws:
    `OntProfileException` - If the `Profile.DISTINCT_MEMBERS()` property is not supported in the current language profile.

### getDistinctMembers

    RDFList getDistinctMembers()

  Answer the list of distinct members for this AllDifferent declaration.

  Returns:
    The list of individuals declared distinct by this AllDifferent declaration.
  Throws:
    `OntProfileException` - If the `Profile.DISTINCT_MEMBERS()` property is not supported in the current language profile.

### listDistinctMembers

    ExtendedIterator listDistinctMembers()

  Answer an iterator over all of the individuals that are declared to be distinct by this AllDifferent declaration. Each element of the iterator will be an `OntResource`.

  Returns:
    An iterator over distinct individuals.
  Throws:
    `OntProfileException` - If the `Profile.DISTINCT_MEMBERS()` property is not supported in the current language profile.

### hasDistinctMember

    boolean hasDistinctMember(Resource res)

  Answer true if this AllDifferent declaration includes `res` as one of the distinct individuals.

  Parameters:
    `res` - A resource to test against
  Returns:
    True if `res` is declared to be distinct from the other individuals in this declation.
  Throws:
    `OntProfileException` - If the `Profile.DISTINCT_MEMBERS()` property is not supported in the current language profile.

### removeDistinctMember

    void removeDistinctMember(Resource res)

  Remove the given resource from the list of distinct individuals. If this statement is not true of the current model, nothing happens.

  Parameters:
    `res` - A resource that is no longer distinct from the other listed individuals

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP