EMMA Coverage Report (generated Sat Jul 01 16:38:45 PDT 2006)
[all classes][jade.jademx.config.jademx.onto]

COVERAGE SUMMARY FOR SOURCE FILE [JademxConfigOntology.java]

nameclass, %method, %block, %line, %
JademxConfigOntology.java100% (1/1)100% (3/3)92%  (140/152)92%  (24.7/27)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JademxConfigOntology100% (1/1)100% (3/3)92%  (140/152)92%  (24.7/27)
JademxConfigOntology (): void 100% (1/1)92%  (133/145)91%  (22.7/25)
<static initializer> 100% (1/1)100% (5/5)100% (1/1)
getInstance (): Ontology 100% (1/1)100% (2/2)100% (1/1)

1// jademx - JADE management using JMX
2// Copyright 2005 Caboodle Networks, Inc.
3//
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8//
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12// Lesser General Public License for more details.
13//
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
17 
18package jade.jademx.config.jademx.onto;
19 
20import jade.content.onto.BasicOntology;
21import jade.content.onto.Ontology;
22import jade.content.onto.OntologyException;
23import jade.content.schema.ConceptSchema;
24import jade.content.schema.ObjectSchema;
25import jade.content.schema.PrimitiveSchema;
26 
27/** 
28 * ontology for messages with content about jademx configuration
29 * @author David Bernstein, <a href="http://www.caboodlenetworks.com"
30 *  >Caboodle Networks, Inc.</a>
31 */
32public class JademxConfigOntology 
33  extends Ontology implements JademxConfigVocabulary {
34 
35    /** constant identifying the ontology name **/
36    public static final String ONTOLOGY_NAME = "jademx-config-ontology";
37    
38    /** the one and only instance */
39    private static Ontology theInstance = new JademxConfigOntology();
40 
41    /** return singleton instance */
42    public static Ontology getInstance() {
43        return theInstance;
44    }
45 
46    /**
47     * Constructor
48     */
49    private JademxConfigOntology() {
50 
51        super( ONTOLOGY_NAME, BasicOntology.getInstance());
52 
53        try {
54            
55            PrimitiveSchema stringSchema =
56                (PrimitiveSchema) getSchema( BasicOntology.STRING );
57            
58            ConceptSchema agentSpecifierSchema = 
59                new ConceptSchema( AGENT_SPECIFIER );
60            ConceptSchema argumentSchema = 
61                new ConceptSchema( ARGUMENT );
62            ConceptSchema platformSchema = 
63                new ConceptSchema( PLATFORM );
64            ConceptSchema runtimeSchema = 
65                new ConceptSchema( RUNTIME );
66            
67            ConceptSchema jademxConfigSchema = 
68                new ConceptSchema( JADEMX_CONFIG );
69            
70            add( agentSpecifierSchema, ConfigAgentSpecifier.class );
71            add( argumentSchema,       ConfigArgument.class );
72            add( platformSchema,       ConfigPlatform.class );
73            add( runtimeSchema,        ConfigRuntime.class );
74            add( jademxConfigSchema,   JademxConfig.class );
75            
76            jademxConfigSchema.add( 
77                    RUNTIMES, runtimeSchema, 0, ObjectSchema.UNLIMITED );
78            
79            runtimeSchema.add( 
80                    PLATFORMS, platformSchema, 0, ObjectSchema.UNLIMITED );
81            
82            platformSchema.add( 
83                    OPTIONS, stringSchema, 0, ObjectSchema.UNLIMITED );
84            platformSchema.add( 
85                    AGENT_SPECIFIERS, agentSpecifierSchema, 
86                    0, ObjectSchema.UNLIMITED );
87            
88            agentSpecifierSchema.add( 
89                    NAME, stringSchema );
90            agentSpecifierSchema.add( 
91                    CLASSNAME, stringSchema );
92            agentSpecifierSchema.add( 
93                    ARGUMENTS, argumentSchema, 0, ObjectSchema.UNLIMITED );
94            
95            argumentSchema.add( 
96                    VALUE, stringSchema );
97            argumentSchema.add( 
98                    CLASSNAME, stringSchema, ObjectSchema.OPTIONAL );
99 
100        } 
101        catch ( OntologyException oe ) {
102            throw new RuntimeException( "Unrecoverable OntologyException", oe );
103        }
104 
105 
106    }
107 
108}

[all classes][jade.jademx.config.jademx.onto]
EMMA 2.0.5312 (C) Vladimir Roubtsov