ua.gradsoft.termware
Class Domain

java.lang.Object
  extended by ua.gradsoft.termware.Domain

public class Domain
extends Object

Domain - hierarchical placement of Term Systems and Facts


Method Summary
 void addFacts(String name, IFacts facts)
          add facts database with name name to domain.
 void addFacts(Term name, IFacts facts)
           
 void addSystem(String name, TermSystem system)
           
 void addSystem(Term name, TermSystem system)
           
 Domain getDirectSubdomain(String name)
           
 String getName()
          return domain name.
 SortedSet<String> getNamesOfDirectSubdomains()
          get names of direct subdomains.
 SortedSet<String> getNamesOfSystems()
          get names of systems, registered in this domain, but not in subdomens.
 Domain getOrCreateDirectSubdomain(String name)
          get subdomain with name name If such subdomain does not exists - it's created.
 Domain getOrCreateSubdomain(String name)
          get or create subdomain, which can be non-direct: i.
 Domain getOrCreateSubdomain(Term name)
           
 Domain getParent()
          return parent of this domain
 Domain getSubdomain(String name)
          get subdomain, which can be non-direct: i.
 void removeFacts(String name)
           
 void removeFacts(Term name)
          remove facts with name name
 void removeSystem(String name)
           
 void removeSystem(Term name)
           
 IFacts resolveFacts(String name)
          resolve facts.
 IFacts resolveFacts(Term t)
          resolve facts.
 TermSystem resolveSystem(String name)
          resolve system with name name Note, that scope of system in this domain is determinatd by path.separators
 TermSystem resolveSystem(Term t)
          resolve system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
return domain name.


getParent

public Domain getParent()
return parent of this domain


getOrCreateSubdomain

public Domain getOrCreateSubdomain(Term name)
                            throws TermWareException
Throws:
TermWareException

getOrCreateDirectSubdomain

public Domain getOrCreateDirectSubdomain(String name)
get subdomain with name name If such subdomain does not exists - it's created.


getDirectSubdomain

public Domain getDirectSubdomain(String name)
                          throws InvalidDomainNameException
Throws:
InvalidDomainNameException

getSubdomain

public Domain getSubdomain(String name)
                    throws InvalidDomainNameException
get subdomain, which can be non-direct: i. e. name can be complex name, where entries separated by / (slash) symbol.

Throws:
InvalidDomainNameException

getOrCreateSubdomain

public Domain getOrCreateSubdomain(String name)
get or create subdomain, which can be non-direct: i. e. name can be complex name, where entries separated by / (slash) symbol. Note, that


addSystem

public void addSystem(String name,
                      TermSystem system)

addSystem

public void addSystem(Term name,
                      TermSystem system)
               throws TermWareException
Throws:
TermWareException

resolveSystem

public TermSystem resolveSystem(Term t)
                         throws TermWareException
resolve system.

Parameters:
t - _name term.
Throws:
TermWareException

resolveSystem

public TermSystem resolveSystem(String name)
                         throws TermWareException
resolve system with name name Note, that scope of system in this domain is determinatd by path.separators

Throws:
TermWareException

removeSystem

public void removeSystem(Term name)
                  throws TermWareException
Throws:
TermWareException

removeSystem

public void removeSystem(String name)

resolveFacts

public IFacts resolveFacts(Term t)
                    throws TermWareException
resolve facts.

Parameters:
t - _name term.
Throws:
TermWareException

resolveFacts

public IFacts resolveFacts(String name)
                    throws TermWareException
resolve facts.

Parameters:
name - - name of facts database to find.
Throws:
TermWareException

getNamesOfDirectSubdomains

public SortedSet<String> getNamesOfDirectSubdomains()
get names of direct subdomains.

Returns:
names of direct subdomains, sorted in lexicographical order.

getNamesOfSystems

public SortedSet<String> getNamesOfSystems()
get names of systems, registered in this domain, but not in subdomens.

Returns:
names of systems, sorted in lexicographical order.

removeFacts

public void removeFacts(Term name)
                 throws TermWareException
remove facts with name name

Throws:
TermWareException

removeFacts

public void removeFacts(String name)

addFacts

public void addFacts(String name,
                     IFacts facts)
add facts database with name name to domain.

Parameters:
name - - name of facts database
facts - - instance of facts database.

addFacts

public void addFacts(Term name,
                     IFacts facts)
              throws TermWareException
Throws:
TermWareException