I'm working with jade and have some agents which communicate with each other. I can design new messagetypes like for example a bookinfo (String name, float prize, boolean availible)
. But I can only create messages with these basic variables like in this example:
ConceptSchema cs = (ConceptSchema) getSchema(BOOKINFO);
cs.add(NAME, (PrimitiveSchema) getSchema(BasicOntology.STRING), ObjectSchema.MANDATORY);
cs.add(PRIZE, (PrimitiveSchema) getSchema(BasicOntology.FLOAT), ObjectSchema.MANDATORY);
cs.add(AVAILIBLE, (PrimitiveSchema) getSchema(BasicOntology.BOOLEAN), ObjectSchema.MANDATORY);
This is how I define the Message in the Ontology
But now I want to send an ArrayList
(e.g. bookinfo (String name, float prize, arrayList authers)
).
What I want is something like:
ConceptSchema cs = (ConceptSchema) getSchema(BOOKINFO);
cs.add(NAME, (PrimitiveSchema) getSchema(BasicOntology.STRING), ObjectSchema.MANDATORY);
cs.add(PRIZE, (PrimitiveSchema) getSchema(BasicOntology.FLOAT), ObjectSchema.MANDATORY);
cs.add(AUTHERS, **ObjectSchema-of-an-arrayList**, ObjectSchema.MANDATORY);
Where **ObjectSchema-of-an-arrayList** has to be defined so I can use it in the code. So I have to create an ObjectSchema for the ArrayList
.
I have searched hours for this problem but didn't found any solution. Can anybody help me?
Regards Hans