\HeaderA{ontology-class}{Class "ontology" wraps a rooted DAG with some
ontology metadata}{ontology.Rdash.class}
\aliasA{accessMat,ontology-method}{ontology-class}{accessMat,ontology.Rdash.method}
\aliasA{makeOntology}{ontology-class}{makeOntology}
\aliasA{name}{ontology-class}{name}
\aliasA{name,ontology-method}{ontology-class}{name,ontology.Rdash.method}
\aliasA{ontology}{ontology-class}{ontology}
\aliasA{OVersion}{ontology-class}{OVersion}
\aliasA{OVersion,ontology-method}{ontology-class}{OVersion,ontology.Rdash.method}
\aliasA{rDAG}{ontology-class}{rDAG}
\aliasA{rDAG,ontology-method}{ontology-class}{rDAG,ontology.Rdash.method}
\aliasA{show,ontology-method}{ontology-class}{show,ontology.Rdash.method}
\keyword{classes}{ontology-class}
\begin{Description}\relax
instances of class ontology are used to
represent things like Gene Ontology
\end{Description}
\begin{Section}{Objects from the Class}
Objects can be created by calls of the form \code{new("ontology", ...)}.
This simply possesses information on name and version of ontology.
\end{Section}
\begin{Section}{Slots}
\describe{
\item[\code{name}:] Object of class \code{"character"} name of ontology 
\item[\code{version}:] Object of class \code{"character"} version tag 
\item[\code{rDAG}:] Object of class \code{"rootedDAG"} the rooted
DAG representing the terminlogy hierarchy 
}
\end{Section}
\begin{Section}{Methods}
\describe{
\item[accessMat] \code{signature(object = "ontology")}: returns
square matrix with 1 in element r,c if term corresponding
to r can be reached from term corresponding to c
\item[name] \code{signature(x = "ontology")}: access name 
\item[OVersion] \code{signature(x = "ontology")}:  access version
\item[rDAG] \code{signature(x = "ontology")}: access the rooted DAG 
\item[show] \code{signature(object = "ontology")}: concise report 
}
\end{Section}
\begin{Note}\relax
This class was written to deal with ontologies
that are representable as rooted DAGs.  It is not clear
that this is a good use of the term 'ontology', which
has broader implications.  However this does work for
Gene Ontology.
\end{Note}
\begin{Author}\relax
~~who you are~~
\end{Author}
\begin{Examples}
\begin{ExampleCode}
data(litOnto)
print(litOnto)
g1 <- new("rootedDAG", DAG=litOnto, root="A")
o1 <- new("ontology", name="demo", version="0.1",
        rDAG=g1)
# can also use
o1b <- makeOntology( name="demo", version="0.1", 
   graph=litOnto, root="A")
show(o1)
print(accessMat(o1))
print(OVersion(o1))
\end{ExampleCode}
\end{Examples}

