public class FactTemplateImpl extends Object implements FactTemplate
Constructor and Description |
---|
FactTemplateImpl() |
FactTemplateImpl(InternalKnowledgePackage pkg,
String name,
FieldTemplate[] fields) |
Modifier and Type | Method and Description |
---|---|
Fact |
createFact(long id)
Method takes a list of Slots and creates a deffact from it.
|
boolean |
equals(Object object) |
FieldTemplate[] |
getAllFieldTemplates()
Return all the slots
|
FieldTemplate |
getFieldTemplate(int index)
get the Slot at the given pattern id
|
FieldTemplate |
getFieldTemplate(String name)
A convienance method for finding the slot matching
the String name.
|
int |
getFieldTemplateIndex(String name)
Look up the pattern index of the slot
|
String |
getName()
the template name is an alias for an object
|
int |
getNumberOfFields()
Return the number of slots in the deftemplate
|
InternalKnowledgePackage |
getPackage() |
int |
hashCode() |
void |
readExternal(ObjectInput in) |
String |
toString()
Method will return a string format with the int type code
for the slot type
|
void |
writeExternal(ObjectOutput out) |
public FactTemplateImpl()
public FactTemplateImpl(InternalKnowledgePackage pkg, String name, FieldTemplate[] fields)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public InternalKnowledgePackage getPackage()
getPackage
in interface FactTemplate
public String getName()
getName
in interface FactTemplate
public int getNumberOfFields()
getNumberOfFields
in interface FactTemplate
public FieldTemplate[] getAllFieldTemplates()
getAllFieldTemplates
in interface FactTemplate
public FieldTemplate getFieldTemplate(String name)
getFieldTemplate
in interface FactTemplate
name
- public FieldTemplate getFieldTemplate(int index)
getFieldTemplate
in interface FactTemplate
public int getFieldTemplateIndex(String name)
getFieldTemplateIndex
in interface FactTemplate
public Fact createFact(long id)
createFact
in interface FactTemplate
public String toString()
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.