public interface IlrBOMVocabulary extends IlrVocabulary
IlrBOMVocabulary defines vocabularies mapped on an
IlrObjectModel.
The following code example shows how to return all phrase templates attached to the passed member. A member is either an attribute or a method of a BOM class.
private String [] getTemplates (IlrMember member) {
List list = new ArrayList ();
IlrBOMVocabulary voc = (IlrBOMVocabulary) session.getWorkingVocabulary().getVocabulary(session.getUserLocale());
IlrFactType ft = voc.getFactType(member);
if (ft!=null) {
List sentences = ft.getSentences();
if ( (sentences != null) && (sentences.size()>0)) {
Iterator iter = sentences.iterator();
while (iter.hasNext()) {
IlrSentence sentence = (IlrSentence) iter.next();
list.add(voc.getBOMTemplate(sentence));
}
}
}
return (String []) list.toArray(new String [list.size()]);
}
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getBOMTemplate(IlrSentence sentence)
Gets the BOM template of
sentence. |
IlrClass |
getClass(IlrConcept concept)
Gets the type corresponding to
concept. |
IlrConcept |
getConcept(IlrClass clazz)
Gets the concept associated to
type. |
IlrConceptInstance |
getConceptInstance(IlrAttribute constant)
Gets the concept instance associated to
constant. |
java.lang.Object |
getConstant(IlrConceptInstance instance)
Gets the constant associated to
instance. |
IlrFactType |
getFactType(IlrMember member)
Gets the phrase (fact type) corresponding to
member. |
IlrMember |
getMember(IlrFactType factType)
Gets the member corresponding to
factType. |
IlrObjectModel |
getObjectModel()
Gets the business object model attached to this vocabulary.
|
void |
setTemplate(IlrSentence sentence,
java.lang.String bomTemplate)
Sets the template to the
sentence, using the specified BOM template. |
addArtifact, clone, getArtifacts, getCategories, getChildConcepts, getConcept, getConcept, getConcept, getConceptInstance, getConceptInstance, getConceptInstances, getConceptInstances, getConcepts, getController, getFactType, getFactTypes, getGlossary, getHeldFactTypes, getLabel, getLocale, getParentConcepts, hasConceptInstances, hasParentConcept, isDeprecated, isDeprecated, isValueType, removeArtifact, setGlossaryaccept, clearInstanceProperties, clearProperties, clearVolatileProperties, delete, getProperties, getProperty, hasProperty, isDeleted, removeProperty, setProperties, setPropertyaddListener, getListeners, notify, removeListenerIlrObjectModel getObjectModel()
IlrFactType getFactType(IlrMember member)
member.member - The member.IlrMember getMember(IlrFactType factType)
factType.factType - The fact type.IlrClass getClass(IlrConcept concept)
concept.concept - The concept.IlrConcept getConcept(IlrClass clazz)
type.clazz - The type.java.lang.Object getConstant(IlrConceptInstance instance)
instance.instance - The concept instance.IlrConceptInstance getConceptInstance(IlrAttribute constant)
constant.constant - The attribute.java.lang.String getBOMTemplate(IlrSentence sentence)
sentence.sentence - The sentence.void setTemplate(IlrSentence sentence, java.lang.String bomTemplate)
sentence, using the specified BOM template.sentence - The target sentence.bomTemplate - The BOM template.© Copyright IBM Corp. 1987, 2017