|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.content.abs.AbsHelper
public class AbsHelper
| Constructor Summary | |
|---|---|
AbsHelper()
|
|
| Method Summary | |
|---|---|
static AbsObject |
addPrefix(AbsObject abs,
java.lang.String prefix)
Recursively add prefix to abs-type-name, except for BasicOntology types Eg. |
static AbsObject |
applyDefaultValues(AbsObject absTemplate,
AbsObject absDefault)
Apply default value to template Replace node with default value only if the value in template is null or AbsVariable or default value is null and template is a true template |
static AbsObject |
createAbsTemplate(java.lang.Class clazz,
Ontology onto)
Generate an AbsObject consistently with class. |
static AbsObject |
createAbsTemplate(ObjectSchema schema)
Generate an AbsObject consistently with schema. |
static AbsObject |
createAbsTemplate(ObjectSchema schema,
java.lang.String prefix)
Generate an AbsObject consistently with schema. |
static AbsAgentAction |
externaliseACLMessage(ACLMessage obj,
Ontology onto)
Converts an ACLMessage into an
AbsAgentAction using
the specified ontology. |
static AbsConcept |
externaliseAID(AID obj)
Converts an AID into an AbsConcept
representing an AID |
static AbsContentElementList |
externaliseContentElementList(ContentElementList obj,
Ontology onto)
Converts a ContentElementList into an
AbsContentElementList using
the specified ontology. |
static AbsAggregate |
externaliseIterator(java.util.Iterator obj,
Ontology onto,
java.lang.String AggregateType)
Converts an Iterator into a AbsAggregate using
the specified ontology. |
static AbsAggregate |
externaliseList(List obj,
Ontology onto,
java.lang.String AggregateType)
Converts a List into a AbsAggregate using
the specified ontology. |
static AbsAggregate |
externaliseSet(Set obj,
Ontology onto,
java.lang.String AggregateType)
Converts a Set into a AbsAggregate using
the specified ontology. |
static OntoACLMessage |
internaliseACLMessage(AbsAgentAction absMsg,
Ontology onto)
Converts to an AbsAgentAction representing an ACLMessage
into an OntoACLMessage using the specified ontology. |
static OntoAID |
internaliseAID(AbsConcept aid)
Converts an AbsConcept representing an AID
into an OntoAID |
static ContentElementList |
internaliseContentElementList(AbsContentElementList l,
Ontology onto)
Converts to an AbsContentElementList into a
ContentElementList using the
specified ontology. |
static java.util.Collection |
internaliseJavaCollection(AbsAggregate aggregate,
Ontology onto)
Converts an AbsAggregate into a List using the
specified ontology. |
static List |
internaliseList(AbsAggregate aggregate,
Ontology onto)
Converts an AbsAggregate into a List using the
specified ontology. |
static Set |
internaliseSet(AbsAggregate aggregate,
Ontology onto)
Converts an AbsAggregate into a Set using the
specified ontology. |
static boolean |
isAbsTemplate(AbsObject abs)
Return true if the abs-object is a template. |
static AbsObject |
nullifyVariables(AbsObject abs,
boolean removeEmptyAggregate)
Remove all variables and empty aggregates (only if specified) |
static AbsObject |
removePrefix(AbsObject abs,
java.lang.String separator)
Recursively removes prefix (if present) from abs-type-name, except for BasicOntology types Prefix is identified from last separator string Eg. |
static void |
setAttribute(AbsObject abs,
java.lang.String attrName,
AbsObject attrValue)
Set an attribute in an abstract descriptor performing all necessary type checks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbsHelper()
| Method Detail |
|---|
public static AbsAggregate externaliseList(List obj,
Ontology onto,
java.lang.String AggregateType)
throws OntologyException
List into a AbsAggregate using
the specified ontology.
obj - the Listonto - the ontology.
OntologyException
public static AbsAggregate externaliseSet(Set obj,
Ontology onto,
java.lang.String AggregateType)
throws OntologyException
Set into a AbsAggregate using
the specified ontology.
obj - the Setonto - the ontology.
OntologyException
public static AbsAggregate externaliseIterator(java.util.Iterator obj,
Ontology onto,
java.lang.String AggregateType)
throws OntologyException
Iterator into a AbsAggregate using
the specified ontology.
obj - the Iteratoronto - the ontology.
OntologyExceptionpublic static AbsConcept externaliseAID(AID obj)
AID into an AbsConcept
representing an AID
obj - the AID
public static AbsContentElementList externaliseContentElementList(ContentElementList obj,
Ontology onto)
throws OntologyException
ContentElementList into an
AbsContentElementList using
the specified ontology.
obj - the ContentElementListonto - the ontology.
OntologyException
public static AbsAgentAction externaliseACLMessage(ACLMessage obj,
Ontology onto)
throws OntologyException
ACLMessage into an
AbsAgentAction using
the specified ontology.
obj - the ACLMessageonto - the ontology.
OntologyException
public static List internaliseList(AbsAggregate aggregate,
Ontology onto)
throws OntologyException
AbsAggregate into a List using the
specified ontology.
onto - the ontology
OntologyException
public static Set internaliseSet(AbsAggregate aggregate,
Ontology onto)
throws OntologyException
AbsAggregate into a Set using the
specified ontology.
onto - the ontology
OntologyException
public static java.util.Collection internaliseJavaCollection(AbsAggregate aggregate,
Ontology onto)
throws OntologyException
AbsAggregate into a List using the
specified ontology.
onto - the ontology
OntologyException
public static OntoAID internaliseAID(AbsConcept aid)
throws OntologyException
AbsConcept representing an AID
into an OntoAID
OntologyException - if aid does not
represent a valid AID
public static ContentElementList internaliseContentElementList(AbsContentElementList l,
Ontology onto)
throws OntologyException
AbsContentElementList into a
ContentElementList using the
specified ontology.
onto - the ontology
OntologyException
public static OntoACLMessage internaliseACLMessage(AbsAgentAction absMsg,
Ontology onto)
throws OntologyException
AbsAgentAction representing an ACLMessage
into an OntoACLMessage using the specified ontology.
onto - the ontology
OntologyException
public static void setAttribute(AbsObject abs,
java.lang.String attrName,
AbsObject attrValue)
throws OntologyException
OntologyException - if a type mismatch is detected
public static AbsObject nullifyVariables(AbsObject abs,
boolean removeEmptyAggregate)
abs - to nullifyremoveEmptyAggregate - if true remove all empty aggregates
public static AbsObject removePrefix(AbsObject abs,
java.lang.String separator)
throws OntologyException
abs - abs to un-prefixseparator - separator string
OntologyException
public static AbsObject addPrefix(AbsObject abs,
java.lang.String prefix)
throws OntologyException
abs - abs to prefixprefix - prefix to add
OntologyExceptionpublic static boolean isAbsTemplate(AbsObject abs)
abs - abs-object to check
public static AbsObject applyDefaultValues(AbsObject absTemplate,
AbsObject absDefault)
throws OntologyException
absTemplate - abs template valueabsDefault - abs value with default value
OntologyException
public static AbsObject createAbsTemplate(java.lang.Class clazz,
Ontology onto)
throws OntologyException
clazz - class to convertonto - reference ontology
OntologyException
public static AbsObject createAbsTemplate(ObjectSchema schema)
throws OntologyException
schema - to convert
java.lang.Exception
OntologyException
public static AbsObject createAbsTemplate(ObjectSchema schema,
java.lang.String prefix)
throws OntologyException
schema - to convertprefix - for variable
java.lang.Exception
OntologyException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||