001// =================== DO NOT EDIT THIS FILE ====================
002// Generated by Modello 2.3.0,
003// any modifications will be overwritten.
004// ==============================================================
005
006package org.codehaus.modello.test.features;
007
008  //---------------------------------/
009 //- Imported classes and packages -/
010//---------------------------------/
011
012import org.codehaus.modello.test.features.other.PackageNameFeature;
013import org.codehaus.modello.test.features.other.SubInterfaceInPackage;
014
015/**
016 * Class Features.
017 * 
018 * @version $Revision$ $Date$
019 */
020@SuppressWarnings( "all" )
021public class Features
022    implements java.io.Serializable
023{
024
025      //--------------------------/
026     //- Class/Member Variables -/
027    //--------------------------/
028
029    /**
030     * A field described as model's versionDefinition field: its
031     * value contains the version of the model used.
032     */
033    private String versionField = "1.0.0";
034
035    /**
036     * Field comment.
037     */
038    private String comment;
039
040    /**
041     * Test of a description.
042     */
043    private String description;
044
045    /**
046     * <field><required>true</required></field>:
047     * Test of a required field.
048     */
049    private String required;
050
051    /**
052     * <field><identifier>true</identifier></field>:
053     * a field taking part in instance identifier.
054     *             This field is used to generate
055     * <code>toString()</code>, <code>hashCode()</code> and
056     * <code>equals()</code>
057     *             methods.
058     */
059    private String identifier;
060
061    /**
062     * Multiple fields can be participate in an identifier, either
063     * simple types or complex ones.
064     */
065    private Reference identifierPart2;
066
067    /**
068     * Field simpleTypes.
069     */
070    private SimpleTypes simpleTypes;
071
072    /**
073     * Field defaultValues.
074     */
075    private SimpleTypes defaultValues;
076
077    /**
078     * Field arrays.
079     */
080    private ArrayFeatures arrays;
081
082    /**
083     * Test of association features.
084     */
085    private AssociationFeatures associationFeatures;
086
087    /**
088     * Field javaFeatures.
089     */
090    private JavaFeatures javaFeatures;
091
092    /**
093     * Field xmlFeatures.
094     */
095    private XmlFeatures xmlFeatures;
096
097    /**
098     * Field xdocFeatures.
099     */
100    private XdocFeatures xdocFeatures;
101
102    /**
103     * Field node.
104     */
105    private NodeItem node;
106
107    /**
108     * Field cloneable.
109     */
110    private Thing cloneable;
111
112    /**
113     * Field file.
114     */
115    private File file;
116
117    /**
118     * Field action.
119     */
120    private Action action;
121
122    /**
123     * Field modelEncoding.
124     */
125    private String modelEncoding = "UTF-8";
126
127
128      //-----------/
129     //- Methods -/
130    //-----------/
131
132    /**
133     * Method equals.
134     * 
135     * @param other a other object.
136     * @return boolean
137     */
138    public boolean equals( Object other )
139    {
140        if ( this == other )
141        {
142            return true;
143        }
144
145        if ( !( other instanceof Features ) )
146        {
147            return false;
148        }
149
150        Features that = (Features) other;
151        boolean result = true;
152
153        result = result && ( getIdentifier() == null ? that.getIdentifier() == null : getIdentifier().equals( that.getIdentifier() ) );
154        result = result && ( getIdentifierPart2() == null ? that.getIdentifierPart2() == null : getIdentifierPart2().equals( that.getIdentifierPart2() ) );
155
156        return result;
157    } //-- boolean equals( Object )
158
159    /**
160     * Get the action field.
161     * 
162     * @return Action
163     */
164    public Action getAction()
165    {
166        return this.action;
167    } //-- Action getAction()
168
169    /**
170     * Get the arrays field.
171     * 
172     * @return ArrayFeatures
173     */
174    public ArrayFeatures getArrays()
175    {
176        return this.arrays;
177    } //-- ArrayFeatures getArrays()
178
179    /**
180     * Get test of association features.
181     * 
182     * @return AssociationFeatures
183     */
184    public AssociationFeatures getAssociationFeatures()
185    {
186        return this.associationFeatures;
187    } //-- AssociationFeatures getAssociationFeatures()
188
189    /**
190     * Get the cloneable field.
191     * 
192     * @return Thing
193     */
194    public Thing getCloneable()
195    {
196        return this.cloneable;
197    } //-- Thing getCloneable()
198
199    /**
200     * Get the comment field.
201     * 
202     * @return String
203     */
204    public String getComment()
205    {
206        return this.comment;
207    } //-- String getComment()
208
209    /**
210     * Get the defaultValues field.
211     * 
212     * @return SimpleTypes
213     */
214    public SimpleTypes getDefaultValues()
215    {
216        return this.defaultValues;
217    } //-- SimpleTypes getDefaultValues()
218
219    /**
220     * Get test of a description.
221     * 
222     * @return String
223     */
224    public String getDescription()
225    {
226        return this.description;
227    } //-- String getDescription()
228
229    /**
230     * Get the file field.
231     * 
232     * @return File
233     */
234    public File getFile()
235    {
236        return this.file;
237    } //-- File getFile()
238
239    /**
240     * Get
241     * &lt;field&gt;&lt;identifier&gt;true&lt;/identifier&gt;&lt;/field&gt;:
242     * a field taking part in instance identifier.
243     *             This field is used to generate
244     * <code>toString()</code>, <code>hashCode()</code> and
245     * <code>equals()</code>
246     *             methods.
247     * 
248     * @return String
249     */
250    public String getIdentifier()
251    {
252        return this.identifier;
253    } //-- String getIdentifier()
254
255    /**
256     * Get multiple fields can be participate in an identifier,
257     * either simple types or complex ones.
258     * 
259     * @return Reference
260     */
261    public Reference getIdentifierPart2()
262    {
263        return this.identifierPart2;
264    } //-- Reference getIdentifierPart2()
265
266    /**
267     * Get the javaFeatures field.
268     * 
269     * @return JavaFeatures
270     */
271    public JavaFeatures getJavaFeatures()
272    {
273        return this.javaFeatures;
274    } //-- JavaFeatures getJavaFeatures()
275
276    /**
277     * Get the modelEncoding field.
278     * 
279     * @return String
280     */
281    public String getModelEncoding()
282    {
283        return this.modelEncoding;
284    } //-- String getModelEncoding()
285
286    /**
287     * Get the node field.
288     * 
289     * @return NodeItem
290     */
291    public NodeItem getNode()
292    {
293        return this.node;
294    } //-- NodeItem getNode()
295
296    /**
297     * Get
298     * &lt;field&gt;&lt;required&gt;true&lt;/required&gt;&lt;/field&gt;:
299     * Test of a required field.
300     * 
301     * @return String
302     */
303    public String getRequired()
304    {
305        return this.required;
306    } //-- String getRequired()
307
308    /**
309     * Get the simpleTypes field.
310     * 
311     * @return SimpleTypes
312     */
313    public SimpleTypes getSimpleTypes()
314    {
315        return this.simpleTypes;
316    } //-- SimpleTypes getSimpleTypes()
317
318    /**
319     * Get a field described as model's versionDefinition field:
320     * its value contains the version of the model used.
321     * 
322     * @return String
323     */
324    public String getVersionField()
325    {
326        return this.versionField;
327    } //-- String getVersionField()
328
329    /**
330     * Get the xdocFeatures field.
331     * 
332     * @return XdocFeatures
333     */
334    public XdocFeatures getXdocFeatures()
335    {
336        return this.xdocFeatures;
337    } //-- XdocFeatures getXdocFeatures()
338
339    /**
340     * Get the xmlFeatures field.
341     * 
342     * @return XmlFeatures
343     */
344    public XmlFeatures getXmlFeatures()
345    {
346        return this.xmlFeatures;
347    } //-- XmlFeatures getXmlFeatures()
348
349    /**
350     * Method hashCode.
351     * 
352     * @return int
353     */
354    public int hashCode()
355    {
356        int result = 17;
357
358        result = 37 * result + ( identifier != null ? identifier.hashCode() : 0 );
359        result = 37 * result + ( identifierPart2 != null ? identifierPart2.hashCode() : 0 );
360
361        return result;
362    } //-- int hashCode()
363
364    /**
365     * Set the action field.
366     * 
367     * @param action a action object.
368     */
369    public void setAction( Action action )
370    {
371        this.action = action;
372    } //-- void setAction( Action )
373
374    /**
375     * Set the arrays field.
376     * 
377     * @param arrays a arrays object.
378     */
379    public void setArrays( ArrayFeatures arrays )
380    {
381        this.arrays = arrays;
382    } //-- void setArrays( ArrayFeatures )
383
384    /**
385     * Set test of association features.
386     * 
387     * @param associationFeatures a associationFeatures object.
388     */
389    public void setAssociationFeatures( AssociationFeatures associationFeatures )
390    {
391        this.associationFeatures = associationFeatures;
392    } //-- void setAssociationFeatures( AssociationFeatures )
393
394    /**
395     * Set the cloneable field.
396     * 
397     * @param cloneable a cloneable object.
398     */
399    public void setCloneable( Thing cloneable )
400    {
401        this.cloneable = cloneable;
402    } //-- void setCloneable( Thing )
403
404    /**
405     * Set the comment field.
406     * 
407     * @param comment a comment object.
408     */
409    public void setComment( String comment )
410    {
411        this.comment = comment;
412    } //-- void setComment( String )
413
414    /**
415     * Set the defaultValues field.
416     * 
417     * @param defaultValues a defaultValues object.
418     */
419    public void setDefaultValues( SimpleTypes defaultValues )
420    {
421        this.defaultValues = defaultValues;
422    } //-- void setDefaultValues( SimpleTypes )
423
424    /**
425     * Set test of a description.
426     * 
427     * @param description a description object.
428     */
429    public void setDescription( String description )
430    {
431        this.description = description;
432    } //-- void setDescription( String )
433
434    /**
435     * Set the file field.
436     * 
437     * @param file a file object.
438     */
439    public void setFile( File file )
440    {
441        this.file = file;
442    } //-- void setFile( File )
443
444    /**
445     * Set
446     * &lt;field&gt;&lt;identifier&gt;true&lt;/identifier&gt;&lt;/field&gt;:
447     * a field taking part in instance identifier.
448     *             This field is used to generate
449     * <code>toString()</code>, <code>hashCode()</code> and
450     * <code>equals()</code>
451     *             methods.
452     * 
453     * @param identifier a identifier object.
454     */
455    public void setIdentifier( String identifier )
456    {
457        this.identifier = identifier;
458    } //-- void setIdentifier( String )
459
460    /**
461     * Set multiple fields can be participate in an identifier,
462     * either simple types or complex ones.
463     * 
464     * @param identifierPart2 a identifierPart2 object.
465     */
466    public void setIdentifierPart2( Reference identifierPart2 )
467    {
468        this.identifierPart2 = identifierPart2;
469    } //-- void setIdentifierPart2( Reference )
470
471    /**
472     * Set the javaFeatures field.
473     * 
474     * @param javaFeatures a javaFeatures object.
475     */
476    public void setJavaFeatures( JavaFeatures javaFeatures )
477    {
478        this.javaFeatures = javaFeatures;
479    } //-- void setJavaFeatures( JavaFeatures )
480
481    /**
482     * Set the modelEncoding field.
483     * 
484     * @param modelEncoding a modelEncoding object.
485     */
486    public void setModelEncoding( String modelEncoding )
487    {
488        this.modelEncoding = modelEncoding;
489    } //-- void setModelEncoding( String )
490
491    /**
492     * Set the node field.
493     * 
494     * @param node a node object.
495     */
496    public void setNode( NodeItem node )
497    {
498        this.node = node;
499    } //-- void setNode( NodeItem )
500
501    /**
502     * Set
503     * &lt;field&gt;&lt;required&gt;true&lt;/required&gt;&lt;/field&gt;:
504     * Test of a required field.
505     * 
506     * @param required a required object.
507     */
508    public void setRequired( String required )
509    {
510        this.required = required;
511    } //-- void setRequired( String )
512
513    /**
514     * Set the simpleTypes field.
515     * 
516     * @param simpleTypes a simpleTypes object.
517     */
518    public void setSimpleTypes( SimpleTypes simpleTypes )
519    {
520        this.simpleTypes = simpleTypes;
521    } //-- void setSimpleTypes( SimpleTypes )
522
523    /**
524     * Set a field described as model's versionDefinition field:
525     * its value contains the version of the model used.
526     * 
527     * @param versionField a versionField object.
528     */
529    public void setVersionField( String versionField )
530    {
531        this.versionField = versionField;
532    } //-- void setVersionField( String )
533
534    /**
535     * Set the xdocFeatures field.
536     * 
537     * @param xdocFeatures a xdocFeatures object.
538     */
539    public void setXdocFeatures( XdocFeatures xdocFeatures )
540    {
541        this.xdocFeatures = xdocFeatures;
542    } //-- void setXdocFeatures( XdocFeatures )
543
544    /**
545     * Set the xmlFeatures field.
546     * 
547     * @param xmlFeatures a xmlFeatures object.
548     */
549    public void setXmlFeatures( XmlFeatures xmlFeatures )
550    {
551        this.xmlFeatures = xmlFeatures;
552    } //-- void setXmlFeatures( XmlFeatures )
553
554    /**
555     * Method toString.
556     * 
557     * @return String
558     */
559    public java.lang.String toString()
560    {
561        StringBuilder buf = new StringBuilder( 128 );
562
563        buf.append( "identifier = '" );
564        buf.append( getIdentifier() );
565        buf.append( "'" );
566        buf.append( "\n" ); 
567        buf.append( "identifierPart2 = '" );
568        buf.append( getIdentifierPart2() );
569        buf.append( "'" );
570
571        return buf.toString();
572    } //-- java.lang.String toString()
573
574    
575            /* this text goes directly into generated code */
576          
577    
578            public final static String CODE_SEGMENT = "freedom with codeSegment";
579          
580}