View Javadoc
1   package org.nuiton.eugene.models.object;
2   
3   /*
4    * #%L
5    * EUGene :: EUGene
6    * %%
7    * Copyright (C) 2004 - 2014 CodeLutin
8    * %%
9    * This program is free software: you can redistribute it and/or modify
10   * it under the terms of the GNU Lesser General Public License as
11   * published by the Free Software Foundation, either version 3 of the
12   * License, or (at your option) any later version.
13   * 
14   * This program is distributed in the hope that it will be useful,
15   * but WITHOUT ANY WARRANTY; without even the implied warranty of
16   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   * GNU General Lesser Public License for more details.
18   * 
19   * You should have received a copy of the GNU General Lesser Public
20   * License along with this program.  If not, see
21   * <http://www.gnu.org/licenses/lgpl-3.0.html>.
22   * #L%
23   */
24  
25  import org.nuiton.eugene.models.extension.tagvalue.WithTagValuesOrStereotypes;
26  
27  import java.util.List;
28  
29  /**
30   * Created on 7/6/14.
31   *
32   * @author Tony Chemit - chemit@codelutin.com
33   * @since 2.12
34   */
35  public interface ObjectModelPackage extends WithTagValuesOrStereotypes {
36  
37      /**
38       * @return the name of this package.
39       */
40      String getName();
41  
42      /**
43       * @return the number of sub packages. (0 for a root package).
44       */
45      int getNumberOfSubPackages();
46  
47      /**
48       * @return parent package or {@code null} if the package is a root package.
49       */
50      ObjectModelPackage getParentPackage();
51  
52      /**
53       * Returns all packages defined in this package.
54       *
55       * @return a Collection containing all ObjectModelPackages for this package.
56       * @see ObjectModelPackage
57       */
58      Iterable<ObjectModelPackage> getPackages();
59  
60      /**
61       * Indicates whether the package contains the package associated to the given package name
62       *
63       * @param packageName - the name of the package to retrieve.
64       * @return true if the package has been found.
65       */
66      boolean hasPackage(String packageName);
67  
68      /**
69       * Returns all classifiers defined in this package. (Except innerClasses)
70       *
71       * @return a Collection containing all ObjectModelClassifier for this package.
72       * @see ObjectModelClassifier
73       */
74      Iterable<ObjectModelClassifier> getClassifiers();
75  
76      /**
77       * Returns the classifier corresponding to the given simple name, or null if the package contains no classifier for this simple name.
78       *
79       * @param simpleName - the qualified name of the classifier to retrieve.
80       * @return the ObjectModelClassifier of the found classifier, or null if the model contains no classifier for this simple name.
81       */
82      ObjectModelClassifier getClassifier(String simpleName);
83  
84      /**
85       * Returns all classes defined in this package. (Except innerClasses)
86       *
87       * @return a Collection containing all ObjectModelClass for this package.
88       * @see ObjectModelClass
89       */
90      Iterable<ObjectModelClass> getClasses();
91  
92      /**
93       * Returns the class corresponding to the given qualified name, or null if the package contains no class for this simple name.
94       *
95       * @param simpleName - the qualified name of the class to retrieve.
96       * @return the ObjectModelClass of the found class, or null if the package contains no class for this simple name.
97       */
98      ObjectModelClass getClass(String simpleName);
99  
100 
101     /**
102      * Indicates whether the package contains the class associated to the given className
103      *
104      * @param simpleName - the qualified name of the class to retrieve.
105      * @return true if the class has been found.
106      */
107     boolean hasClass(String simpleName);
108 
109     /**
110      * Returns all interfaces defined in this package.
111      *
112      * @return a Collection containing all ObjectModelInterface for this package.
113      * @see ObjectModelInterface
114      */
115     Iterable<ObjectModelInterface> getInterfaces();
116 
117     /**
118      * Returns the interface corresponding to the given qualified name, or null if the package contains no interface for this simple name.
119      *
120      * @param simpleName the qualified name of the interface to retrieve.
121      * @return the ObjectModelInterface of the found interface, or null if the package contains no interface for this simple name.
122      */
123     ObjectModelInterface getInterface(String simpleName);
124 
125 
126     /**
127      * Returns all enumerations defined in this package.
128      *
129      * @return a Collection containing all ObjectModelEnumeration for this package.
130      * @see ObjectModelEnumeration
131      */
132     Iterable<ObjectModelEnumeration> getEnumerations();
133 
134     /**
135      * Return the enumeration corresponding to the given simple name
136      *
137      * @param simpleName the fully qualified name of the enumeration to retrieve.
138      * @return the ObjectModelEnumeration of the found enumeration or null if the package contains no enumeration for this simple name.
139      */
140     ObjectModelEnumeration getEnumeration(String simpleName);
141 
142     /**
143      * Returns all comments not lied to a particular package element
144      *
145      * @return a List containing all comments for this package as Strings.
146      */
147     List<String> getComments();
148 
149     /**
150      * Returns the whole documentation associated with this element (description + source documentation).
151      *
152      * @return the whole documentation associated with this element.
153      */
154     String getDocumentation();
155 
156     /**
157      * The description of this element is the upper part of the element's
158      * documentation.
159      *
160      * The other part of the document can be accessed with
161      * {@link #getSourceDocumentation()}
162      *
163      * @return the description associated with this element.
164      */
165     String getDescription();
166 
167     /**
168      * Returns the source documentation part associated with this element.
169      * Source documentation is at end of documentation and are separated of
170      * over documentation by "--"
171      *
172      * @return the source documentation part associated with this element.
173      */
174     String getSourceDocumentation();
175 
176 } //ObjectModelPackage