|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.templateparser.TemplateFactory
Makes templates which are used by the TemplateParser to parser user input.
All methods are static.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
protected static java.util.HashMap |
templateCache
Caches template objects to keep from making them twice. |
Constructor Summary | |
TemplateFactory()
|
Method Summary | |
static Template |
getTemplate(CycList templateElements)
Returns a Template object from the cache given the template elements. |
static java.util.Collection |
getTemplates()
Returns the templates. |
static void |
makeAllTemplates()
Makes all templates. |
static Template |
makeChoiceIsNumberTemplate(java.lang.Integer positiveInteger,
CycFort term)
Make the choiceIsNumber template. |
static Template |
makeChoiceIsPhraseTemplate(java.lang.String phrase,
CycFort term)
Make the choiceIsPhrase template. |
static Template |
makeDisambiguateTermQueryTemplate()
Make the term query template |
static Template |
makeDoneTemplate()
Make the done template |
static Template |
makeMoreTemplate()
Make the more template |
static Template |
makeQuitTemplate()
Make the quit template |
static Template |
makeTemplate(CycFort mt,
CycList templateElements,
Performative performative)
Makes a new Template object given the template elements and performative. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static java.util.HashMap templateCache
Constructor Detail |
public TemplateFactory()
Method Detail |
public static java.util.Collection getTemplates()
public static Template makeTemplate(CycFort mt, CycList templateElements, Performative performative)
mt
- the microtheory in which this template appliestemplateElements
- the template elementsperformative
- the performativepublic static Template getTemplate(CycList templateElements)
templateElements
- the template elementspublic static void makeAllTemplates()
public static Template makeQuitTemplate()
public static Template makeMoreTemplate()
public static Template makeDoneTemplate()
public static Template makeDisambiguateTermQueryTemplate()
public static Template makeChoiceIsNumberTemplate(java.lang.Integer positiveInteger, CycFort term)
number
- the integer to parseterm
- the term that corresponds to the given integerpublic static Template makeChoiceIsPhraseTemplate(java.lang.String phrase, CycFort term)
number
- the phrase to parseterm
- the term that corresponds to the given phrase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |