// Validate the content against the ontology
ObjectSchema schema = onto.getSchema(content.getTypeName());
if (schema == null) {
throw new OntologyException("No schema found for type "+content.getTypeName());
}
schema.validate(content, onto);
}
}
private void encode(ACLMessage msg, AbsContentElement content, Codec codec, Ontology onto) throws CodecException, OntologyException {
if (codec instanceof ByteArrayCodec)