\Header{ontology-class}{Class "ontology" wraps a rooted DAG with some
ontology metadata}
\alias{accessMat,ontology-method}{ontology-class}
\alias{makeOntology}{ontology-class}
\alias{name}{ontology-class}
\alias{name,ontology-method}{ontology-class}
\alias{ontology}{ontology-class}
\alias{OVersion}{ontology-class}
\alias{OVersion,ontology-method}{ontology-class}
\alias{rDAG}{ontology-class}
\alias{rDAG,ontology-method}{ontology-class}
\alias{show,ontology-method}{ontology-class}
\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}

