Package jade.content.lang.Codec

Examples of jade.content.lang.Codec.CodecException


   * to the ontology used for this operation.
   */
  public void fillContent(ACLMessage msg, AbsContentElement content) throws CodecException, OntologyException {
    Codec    codec = lookupLanguage(msg.getLanguage());
    if (codec == null) {
      throw new CodecException("Unknown language "+msg.getLanguage());
    }
    String ontoName = msg.getOntology();
    Ontology o = null;
    if (ontoName != null) {
      o = lookupOntology(ontoName);
View Full Code Here


   * to the ontology used for this operation.
   */
  public void fillContent(ACLMessage msg, ContentElement content) throws CodecException, OntologyException {
    Codec    codec = lookupLanguage(msg.getLanguage());
    if (codec == null) {
      throw new CodecException("Unknown language "+msg.getLanguage());
    }
    String ontoName = msg.getOntology();
    Ontology o = null;
    if (ontoName != null) {
      o = lookupOntology(ontoName);
View Full Code Here

   * to the ontology used for this operation.
   */
  public AbsContentElement extractAbsContent(ACLMessage msg) throws CodecException, OntologyException {
    Codec    codec = lookupLanguage(msg.getLanguage());
    if (codec == null) {
      throw new CodecException("Unknown language "+msg.getLanguage());
    }
    String ontoName = msg.getOntology();
    Ontology o = null;
    if (ontoName != null) {
      o = lookupOntology(ontoName);
View Full Code Here

   * to the ontology used for this operation.
   */
  public ContentElement extractContent(ACLMessage msg) throws CodecException, UngroundedException, OntologyException {
    Codec    codec = lookupLanguage(msg.getLanguage());
    if (codec == null) {
      throw new CodecException("Unknown language "+msg.getLanguage());
    }
    String ontoName = msg.getOntology();
    Ontology o = null;
    if (ontoName != null) {
      o = lookupOntology(ontoName);
View Full Code Here

    if (codec instanceof ByteArrayCodec)
      msg.setByteSequenceContent(((ByteArrayCodec) codec).encode(onto, content));
    else if (codec instanceof StringCodec)
      msg.setContent(((StringCodec) codec).encode(onto, content));
    else
      throw new CodecException("UnsupportedTypeOfCodec");
  }
View Full Code Here

    if (codec instanceof ByteArrayCodec)
      return ((ByteArrayCodec) codec).decode(onto, msg.getByteSequenceContent());
    else if (codec instanceof StringCodec)
      return ((StringCodec) codec).decode(onto, msg.getContent());
    else
      throw new CodecException("UnsupportedTypeOfCodec");
  }
View Full Code Here

TOP

Related Classes of jade.content.lang.Codec.CodecException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.