|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dishevelled.vocabulary.simple.SimpleDomain
public class SimpleDomain
Simple implementation of the Domain interface.
Field Summary | |
---|---|
private Authority |
authority
Authority. |
private java.util.Set<Concept> |
concepts
Set of concepts. |
private java.util.Set<Mapping> |
inMappings
Set of in mappings. |
private java.lang.String |
name
Domain name. |
private java.util.Set<Mapping> |
outMappings
Set of out mappings. |
private java.util.Set<Relation> |
relations
Set of relations. |
Constructor Summary | |
---|---|
SimpleDomain(Authority authority,
java.lang.String name)
Create a new domain with the specified authority and name. |
Method Summary | |
---|---|
(package private) void |
addConcept(SimpleConcept concept)
Add the specified concept. |
(package private) void |
addInMapping(SimpleMapping mapping)
Add the specified in mapping. |
(package private) void |
addOutMapping(SimpleMapping mapping)
Add the specified out mapping. |
(package private) void |
addRelation(SimpleRelation relation)
Add the specified relation. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final java.lang.String name
private final java.util.Set<Concept> concepts
private final java.util.Set<Relation> relations
private final java.util.Set<Mapping> inMappings
private final java.util.Set<Mapping> outMappings
private final Authority authority
Constructor Detail |
---|
SimpleDomain(Authority authority, java.lang.String name)
authority
must
not be null.
authority
- authorityname
- domain nameMethod Detail |
---|
public java.lang.String getName()
Domain
getName
in interface Domain
Domain
public java.util.Set<Concept> getConcepts()
Domain
getConcepts
in interface Domain
Domain
public java.util.Set<Relation> getRelations()
Domain
getRelations
in interface Domain
Domain
public java.util.Set<Mapping> inMappings()
Domain
inMappings
in interface Domain
Domain
public java.util.Set<Mapping> outMappings()
Domain
outMappings
in interface Domain
Domain
public java.util.Set<Mapping> getMappings()
Domain
getMappings
in interface Domain
Domain
public Authority getAuthority()
Domain
getAuthority
in interface Domain
Domain
void addConcept(SimpleConcept concept)
concept
- concept to addvoid addRelation(SimpleRelation relation)
relation
- relation to addvoid addInMapping(SimpleMapping mapping)
mapping
- in mapping to addvoid addOutMapping(SimpleMapping mapping)
mapping
- out mapping to addpublic Concept createConcept(java.lang.String name, java.lang.String accession, java.lang.String definition)
Domain
createConcept
in interface Domain
name
- concept nameaccession
- concept accessiondefinition
- concept definition
Domain
public Relation createRelation(java.lang.String name, Concept source, Concept target)
Domain
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.
createRelation
in interface Domain
name
- relation namesource
- relation source concepttarget
- relation target concept
Domain
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |