org.dishevelled.vocabulary
Interface Domain

All Known Implementing Classes:
SimpleDomain

public interface Domain

A domain provides a named space in which to define concepts and their relations to each other, and also to project concepts in different domains to each other through a mapping across domains.

Version:
$Revision$ $Date$
Author:
Michael Heuer

Method Summary
 Concept createConcept(java.lang.String name, java.lang.String accession, java.lang.String definition)
          Create a new concept in this domain with the specified name, accession, and definition (optional operation).
 Relation createRelation(java.lang.String name, Concept source, Concept target)
          Create a new relation in this domain between concepts source and target with the specified name (optional operation).
 Authority getAuthority()
          Return the authority for this domain.
 java.util.Set<Concept> getConcepts()
          Return the set of all concepts in this domain.
 java.util.Set<Mapping> getMappings()
          Return the set of all mappings for this domain.
 java.lang.String getName()
          Return the name of this domain.
 java.util.Set<Relation> getRelations()
          Return the set of all relations in this domain.
 java.util.Set<Mapping> inMappings()
          Return the set of in mappings for this domain, that is those mappings that have this domain as the target.
 java.util.Set<Mapping> outMappings()
          Return the set of out mappings for this domain, that is those mappings that have this domain as the source.
 

Method Detail

getName

java.lang.String getName()
Return the name of this domain.

Returns:
the name

getConcepts

java.util.Set<Concept> getConcepts()
Return the set of all concepts in this domain. The set must not be null, but may be empty.

Returns:
the set of all concepts

getRelations

java.util.Set<Relation> getRelations()
Return the set of all relations in this domain. The set must not be null, but may be empty.

Returns:
the set of all relations

inMappings

java.util.Set<Mapping> inMappings()
Return the set of in mappings for this domain, that is those mappings that have this domain as the target. The set must not be null, but may be empty.

Returns:
the set of in mappings

outMappings

java.util.Set<Mapping> outMappings()
Return the set of out mappings for this domain, that is those mappings that have this domain as the source. The set must not be null, but may be empty.

Returns:
the set of out mappings

getMappings

java.util.Set<Mapping> getMappings()
Return the set of all mappings for this domain. The set must not be null, but may be empty.

Returns:
the set of all mappings

getAuthority

Authority getAuthority()
Return the authority for this domain. The authority must not be null.

Returns:
the authority

createConcept

Concept createConcept(java.lang.String name,
                      java.lang.String accession,
                      java.lang.String definition)
Create a new concept in this domain with the specified name, accession, and definition (optional operation). The specified accession must be unique within this domain and may not be null.

Parameters:
name - concept name
accession - concept accession
definition - concept definition
Returns:
new concept
Throws:
java.lang.UnsupportedOperationException - if the createConcept method is not supported by this Domain

createRelation

Relation createRelation(java.lang.String name,
                        Concept source,
                        Concept target)
Create a new relation in this domain between concepts source and target with the specified name (optional operation). Only one relation may exist between the same source and target with the same name within this domain. The source and target concepts must not be null.

Parameters:
name - relation name
source - relation source concept
target - relation target concept
Returns:
new relation
Throws:
java.lang.UnsupportedOperationException - if the createRelation method is not supported by this Domain


Copyright (c) 2002-2004 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).