ua.gradsoft.termware.transformers.sys
Class SystemTransformer

java.lang.Object
  extended by ua.gradsoft.termware.AbstractBuildinTransformer
      extended by ua.gradsoft.termware.transformers.sys.SystemTransformer
All Implemented Interfaces:
ITermTransformer

public class SystemTransformer
extends AbstractBuildinTransformer

Transformer for system definiton term. System definition term is term system(name,facts,ruleset,strategy) - which means define into current root domain system with name 'name' and facts 'facts' and ruleset 'ruleste' with strategy 'strategy'. Note, that system term can be a part of domain term - in such way systems can be hierarchically organized by domains.


Constructor Summary
SystemTransformer()
           
 
Method Summary
 String getDescription()
          get description of transformer.
 String getName()
          get name of transformer.
 boolean internalsAtFirst()
           
static Term static_transform(Term t, TermSystem sys, TransformationContext ctx)
           
static Term static_transform(Term t, TermSystem sys, TransformationContext ctx, Domain where)
           
 Term transform(Term t, TermSystem sys, TransformationContext ctx)
          in t must be system definition.
 
Methods inherited from class ua.gradsoft.termware.AbstractBuildinTransformer
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SystemTransformer

public SystemTransformer()
Method Detail

internalsAtFirst

public boolean internalsAtFirst()

transform

public Term transform(Term t,
                      TermSystem sys,
                      TransformationContext ctx)
               throws TermWareException
in t must be system definition. Transformer transform one to true and add system to current TermWare instance. If t does not contain system definition - leave it unchanged.

Parameters:
t - - term to transform
sys - - system which give us access to ebvironment.
ctx - - context of transformation.
Returns:
- transformed term.
Throws:
TermWareException

static_transform

public static Term static_transform(Term t,
                                    TermSystem sys,
                                    TransformationContext ctx)
                             throws TermWareException
Throws:
TermWareException
See Also:
transform(ua.gradsoft.termware.Term, ua.gradsoft.termware.TermSystem, ua.gradsoft.termware.TransformationContext)

static_transform

public static Term static_transform(Term t,
                                    TermSystem sys,
                                    TransformationContext ctx,
                                    Domain where)
                             throws TermWareException
Throws:
TermWareException

getDescription

public String getDescription()
Description copied from class: AbstractBuildinTransformer
get description of transformer. Default behaviour -- return the value of annotation @TransformerDescription binded to this.getClass().

Specified by:
getDescription in interface ITermTransformer
Overrides:
getDescription in class AbstractBuildinTransformer
See Also:
TransformerDescription

getName

public String getName()
Description copied from class: AbstractBuildinTransformer
get name of transformer. Default behaviour -- return the value of annotation @TransformerName binded to this.getClass().

Specified by:
getName in interface ITermTransformer
Overrides:
getName in class AbstractBuildinTransformer
Returns:
name of transformer.
See Also:
TransformerName