com.haley.haleyrules
Interface Template

All Superinterfaces:
KnowledgeBaseObject, Representation

public interface Template
extends Representation

The Template interface published the API for a template representation defined by the Eclipse "deftemplate" construct. A template is returned by KnowledgeBase.findTemplate(String) and TemplateField.getTemplate().

Author:
The Haley Enterprise Copyright © 1998-2004, all rights reserved. Questions, comments or to report a problem contact support@haley.com

Method Summary
 TemplateAssertion beginAssertion(WorkingMemory wm)
          Begins an assertion for this template.
 TemplateField findField(java.lang.String name)
          Get the named TemplateField of this Template
 Template getParentTemplate()
          Returns the parent template, if one is defined.
 
Methods inherited from interface com.haley.haleyrules.Representation
getName
 
Methods inherited from interface com.haley.haleyrules.KnowledgeBaseObject
getKnowledgeBase, release
 

Method Detail

findField

public TemplateField findField(java.lang.String name)
                        throws EclipseException
Get the named TemplateField of this Template

Parameters:
name - the name of the field
Returns:
the field with the specified name in the template or null if it could not be found
Throws:
EclipseException - if knowledge base has been cleared
EclipseException - if the template has been released

beginAssertion

public TemplateAssertion beginAssertion(WorkingMemory wm)
                                 throws EclipseException
Begins an assertion for this template. Subsequent calls to assign initialize fields of the template. A final call to assertFact() causes the fact to be asserted and the assertion is left in the same state as after a reset()

Returns:
the template assertion
Throws:
EclipseException - if knowledge base has been cleared
EclipseException - if working memory has been deleted

getParentTemplate

public Template getParentTemplate()
                           throws EclipseException
Returns the parent template, if one is defined.

Returns:
the parent template or null if a top-level template
Throws:
EclipseException - if knowledge base has been cleared
EclipseException - if the template has been deleted


Copyright © 1998-2006 Haley Systems, Inc. All Rights Reserved.