// Path: rdfagents-jade/src/main/java/net/fortytwo/rdfagents/jade/RDFAgentsOntology.java
// public class RDFAgentsOntology extends Ontology {
//     private static final RDFAgentsOntology INSTANCE;
// 
//     static {
//         try {
//             INSTANCE = new RDFAgentsOntology();
//         } catch (OntologyException e) {
//             throw new ExceptionInInitializerError(e);
//         }
//     }
// 
//     public static final String
//             DATASET = "dataset",             // implicit (used only as a variable)
//             DESCRIBES = "describes",
//             DESCRIBES_DATASET = "dataset",   // implicit (unnamed parameter)
//             DESCRIBES_SUBJECT = "subject",   // implicit (unnamed parameter)
//             EXPLANATION = "explanation",     // implicit (abstract class) -- specific errors are in ErrorExplanation
//             EXPLANATION_MESSAGE = "message",
//             LITERAL = "literal",
//             LITERAL_DATATYPE = "datatype",
//             LITERAL_LANGUAGE = "language",
//             LITERAL_LABEL = "label",
//             VALUE = "value",                 // implicit (abstract class)
//             RESOURCE = "resource",
//             RESOURCE_IRI = "iri";
// 
//     private RDFAgentsOntology() throws OntologyException {
//         super(RDFAgents.RDFAGENTS_ONTOLOGY_NAME, SLOntology.getInstance());
// 
//         add(new PredicateSchema(DESCRIBES));
// 
//         add(new ConceptSchema(DATASET));
//         add(new ConceptSchema(VALUE));
//         add(new ConceptSchema(RESOURCE));
//         add(new ConceptSchema(LITERAL));
// 
//         add(new PredicateSchema(EXPLANATION));
//         for (ErrorExplanation.Type x : ErrorExplanation.Type.values()) {
//             add(new PredicateSchema(x.getFipaName()));
//         }
// 
//         ConceptSchema dataset = (ConceptSchema) getSchema(DATASET);
//         ConceptSchema resource = (ConceptSchema) getSchema(VALUE);
//         ConceptSchema iri = (ConceptSchema) getSchema(RESOURCE);
//         ConceptSchema literal = (ConceptSchema) getSchema(LITERAL);
//         iri.addSuperSchema(resource);
//         iri.add(RESOURCE_IRI, (PrimitiveSchema) getSchema(BasicOntology.STRING));
//         literal.addSuperSchema(resource);
//         literal.add(LITERAL_LABEL, (PrimitiveSchema) getSchema(BasicOntology.STRING));
//         literal.add(LITERAL_DATATYPE, iri, ObjectSchema.OPTIONAL);
//         literal.add(LITERAL_LANGUAGE, (PrimitiveSchema) getSchema(BasicOntology.STRING), ObjectSchema.OPTIONAL);
// 
//         PredicateSchema describes = (PredicateSchema) getSchema(DESCRIBES);
//         describes.add(DESCRIBES_DATASET, dataset);
//         describes.add(DESCRIBES_SUBJECT, resource);
// 
//         PredicateSchema explanation = (PredicateSchema) getSchema(EXPLANATION);
//         explanation.add(EXPLANATION_MESSAGE, getSchema(BasicOntology.STRING));
// 
//         for (ErrorExplanation.Type x : ErrorExplanation.Type.values()) {
//             PredicateSchema s = (PredicateSchema) getSchema(x.getFipaName());
//             s.addSuperSchema(explanation);
//         }
//     }
// 
//     public static RDFAgentsOntology getInstance() {
//         return INSTANCE;
//     }
// }


import jade.content.ContentManager;
import jade.content.lang.Codec;
import jade.content.lang.sl.SLCodec;
import jade.content.onto.BasicOntology;
import jade.core.AID;
import jade.domain.FIPANames;
import jade.lang.acl.ACLMessage;
import jade.lang.acl.StringACLCodec;
import net.fortytwo.rdfagents.jade.RDFAgentsOntology;
import java.util.Random;
        client.setName("http://fortytwo.net/agents/smith");
        client.addAddresses("xmpp:smith@fortytwo.net");

        AID server = new AID();
        server.setName("http://example.org/rdfnews");
        server.addAddresses("xmpp:rdfnews@example.org");

        ContentManager manager = new ContentManager();
        Codec codec = new SLCodec(0);
        manager.registerLanguage(codec);
        manager.registerOntology(BasicOntology.getInstance());
        for (String s : manager.getLanguageNames()) {
            System.out.println("language: " + s);
        }
        for (String s : manager.getOntologyNames()) {
            System.out.println("ontology: " + s);
        }
        ACLMessage m;

        m = new ACLMessage(ACLMessage.INFORM);
        m.setSender(client);
        m.addReceiver(server);
        print(m);

        m = new ACLMessage(ACLMessage.QUERY_REF);
        m.setSender(client);
        m.addReceiver(server);
        m.setProtocol(FIPANames.InteractionProtocol.FIPA_QUERY);
        m.setConversationId(convId);
        m.setLanguage(codec.getName());
// Path: rdfagents-jade/src/main/java/net/fortytwo/rdfagents/jade/RDFAgentsOntology.java
// public class RDFAgentsOntology extends Ontology {
//     private static final RDFAgentsOntology INSTANCE;
// 
//     static {
//         try {
//             INSTANCE = new RDFAgentsOntology();
//         } catch (OntologyException e) {
//             throw new ExceptionInInitializerError(e);
//         }
//     }
// 
//     public static final String
//             DATASET = "dataset",             // implicit (used only as a variable)
//             DESCRIBES = "describes",
//             DESCRIBES_DATASET = "dataset",   // implicit (unnamed parameter)
//             DESCRIBES_SUBJECT = "subject",   // implicit (unnamed parameter)
//             EXPLANATION = "explanation",     // implicit (abstract class) -- specific errors are in ErrorExplanation
//             EXPLANATION_MESSAGE = "message",
//             LITERAL = "literal",
//             LITERAL_DATATYPE = "datatype",
//             LITERAL_LANGUAGE = "language",
//             LITERAL_LABEL = "label",
//             VALUE = "value",                 // implicit (abstract class)
//             RESOURCE = "resource",
//             RESOURCE_IRI = "iri";
// 
//     private RDFAgentsOntology() throws OntologyException {
//         super(RDFAgents.RDFAGENTS_ONTOLOGY_NAME, SLOntology.getInstance());
// 
//         add(new PredicateSchema(DESCRIBES));
// 
//         add(new ConceptSchema(DATASET));
//         add(new ConceptSchema(VALUE));
//         add(new ConceptSchema(RESOURCE));
//         add(new ConceptSchema(LITERAL));
// 
//         add(new PredicateSchema(EXPLANATION));
//         for (ErrorExplanation.Type x : ErrorExplanation.Type.values()) {
//             add(new PredicateSchema(x.getFipaName()));
//         }
// 
//         ConceptSchema dataset = (ConceptSchema) getSchema(DATASET);
//         ConceptSchema resource = (ConceptSchema) getSchema(VALUE);
//         ConceptSchema iri = (ConceptSchema) getSchema(RESOURCE);
//         ConceptSchema literal = (ConceptSchema) getSchema(LITERAL);
//         iri.addSuperSchema(resource);
//         iri.add(RESOURCE_IRI, (PrimitiveSchema) getSchema(BasicOntology.STRING));
//         literal.addSuperSchema(resource);
//         literal.add(LITERAL_LABEL, (PrimitiveSchema) getSchema(BasicOntology.STRING));
//         literal.add(LITERAL_DATATYPE, iri, ObjectSchema.OPTIONAL);
//         literal.add(LITERAL_LANGUAGE, (PrimitiveSchema) getSchema(BasicOntology.STRING), ObjectSchema.OPTIONAL);
// 
//         PredicateSchema describes = (PredicateSchema) getSchema(DESCRIBES);
//         describes.add(DESCRIBES_DATASET, dataset);
//         describes.add(DESCRIBES_SUBJECT, resource);
// 
//         PredicateSchema explanation = (PredicateSchema) getSchema(EXPLANATION);
//         explanation.add(EXPLANATION_MESSAGE, getSchema(BasicOntology.STRING));
// 
//         for (ErrorExplanation.Type x : ErrorExplanation.Type.values()) {
//             PredicateSchema s = (PredicateSchema) getSchema(x.getFipaName());
//             s.addSuperSchema(explanation);
//         }
//     }
// 
//     public static RDFAgentsOntology getInstance() {
//         return INSTANCE;
//     }
// }


// Path: rdfagents-jade/src/main/java/net/fortytwo/rdfagents/jade/testing/ExampleMessages.java
import jade.content.ContentManager;
import jade.content.lang.Codec;
import jade.content.lang.sl.SLCodec;
import jade.content.onto.BasicOntology;
import jade.core.AID;
import jade.domain.FIPANames;
import jade.lang.acl.ACLMessage;
import jade.lang.acl.StringACLCodec;
import net.fortytwo.rdfagents.jade.RDFAgentsOntology;
import java.util.Random;

        client.setName("http://fortytwo.net/agents/smith");
        client.addAddresses("xmpp:smith@fortytwo.net");

        AID server = new AID();
        server.setName("http://example.org/rdfnews");
        server.addAddresses("xmpp:rdfnews@example.org");

        ContentManager manager = new ContentManager();
        Codec codec = new SLCodec(0);
        manager.registerLanguage(codec);
        manager.registerOntology(BasicOntology.getInstance());
        for (String s : manager.getLanguageNames()) {
            System.out.println("language: " + s);
        }
        for (String s : manager.getOntologyNames()) {
            System.out.println("ontology: " + s);
        }
        ACLMessage m;

        m = new ACLMessage(ACLMessage.INFORM);
        m.setSender(client);
        m.addReceiver(server);
        print(m);

        m = new ACLMessage(ACLMessage.QUERY_REF);
        m.setSender(client);
        m.addReceiver(server);
        m.setProtocol(FIPANames.InteractionProtocol.FIPA_QUERY);
        m.setConversationId(convId);
        m.setLanguage(codec.getName());
        m.setOntology(RDFAgentsOntology.getInstance().getName());