KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > uml > lib > ModelData


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA - USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Pierre Carpentier.
23 Contributor(s): Philippe Merle.
24
25 ---------------------------------------------------------------------
26 $Id: ModelData.java,v 1.1 2004/05/26 11:25:34 carpentier Exp $
27 ====================================================================*/

28
29 package org.objectweb.openccm.uml.lib;
30
31 import java.io.File JavaDoc;
32
33
34 /**
35  * Class representation of a Model.
36  *
37  * @author <a HREF="mailto:Pierre.Carpentier@lifl.fr">Pierre Carpentier</a>
38  *
39  * @version 1.0
40  */

41
42 public class ModelData
43 {
44
45     // ==================================================================
46
//
47
// Internal state.
48
//
49
// ==================================================================
50

51     /** The file of the model. */
52     private File JavaDoc modelFile = null;
53     
54     /** The URI of the model, i.e. the name which represents the model in the rules file. */
55     private String JavaDoc modelUri = null;
56     
57     /** The URL of the metamodel file. */
58     private String JavaDoc metamodelURL = null;
59     
60     /** The outermost package of the repository (corresponding to the metamodel). */
61     private String JavaDoc metamodelJmiClass = null;
62     
63     /** The class to import or export the model in/from the repository
64      * (it depends if the model is the source or the destination model). */

65     private String JavaDoc modelIOClass = null;
66     
67     // ==================================================================
68
//
69
// Constructor.
70
//
71
// ==================================================================
72

73     /**
74      * The default constructor.
75      *
76      * @param modelFilename The filename of the model.
77      * @param modelUri The URI of the model.
78      * @param metamodelURL The URL of the metamodel file.
79      * @param metamodelJmiClass The outermost package of the repository.
80      * @param modelIOClass The class to import or export the model in/from the repository.
81      */

82     public
83     ModelData(File JavaDoc modelFile, String JavaDoc modelUri, String JavaDoc metamodelURL, String JavaDoc metamodelJmiClass, String JavaDoc modelIOClass) {
84         this.modelFile = modelFile;
85         this.modelUri = modelUri;
86         this.metamodelURL = metamodelURL;
87         this.metamodelJmiClass = metamodelJmiClass;
88         this.modelIOClass = modelIOClass;
89     }
90
91     // ==================================================================
92
//
93
// Internal methods.
94
//
95
// ==================================================================
96

97     // ==================================================================
98
//
99
// Public accessor methods.
100
//
101
// ==================================================================
102

103     /**
104      * Gets the filename of the model.
105      * @return Returns the filename of the model.
106      */

107     public File JavaDoc getModelFile() {
108         return modelFile;
109     }
110     
111     /**
112      * Gets the URI of the model.
113      * @return Returns the URI of the model.
114      */

115     public String JavaDoc getModelUri() {
116         return modelUri;
117     }
118     
119     /**
120      * Gets the URL of the metamodel file.
121      * @return Returns the URL of the metamodel file.
122      */

123     public String JavaDoc getMetamodelURL() {
124         return metamodelURL;
125     }
126
127     /**
128      * Gets the outermost package of the repository.
129      * @return Returns the outermost package of the repository.
130      */

131     public String JavaDoc getMetamodelJmiClasses() {
132         return metamodelJmiClass;
133     }
134     
135     /**
136      * Gets the class to import or export the model in/from the repository.
137      * @return Returns the class to import or export the model in/from the repository.
138      */

139     public String JavaDoc getModelIOClass() {
140         return modelIOClass;
141     }
142     
143 }
144
Popular Tags