View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.5.1,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.doxia.site.decoration;
25  
26  /**
27   * A link in the navigation.
28   * 
29   * @version $Revision$ $Date$
30   */
31  @SuppressWarnings( "all" )
32  public class LinkItem
33      implements java.io.Serializable, java.lang.Cloneable
34  {
35  
36        //--------------------------/
37       //- Class/Member Variables -/
38      //--------------------------/
39  
40      /**
41       * The name to display for the link.
42       */
43      private String name;
44  
45      /**
46       * The href to use for the link.
47       */
48      private String href;
49  
50      /**
51       * The source location of an image.
52       */
53      private String img;
54  
55      /**
56       * Where to place the image regarding the displayed name (left
57       * or right).
58       */
59      private String position = "left";
60  
61      /**
62       * The alt to use for the image.
63       */
64      private String alt;
65  
66      /**
67       * The border to use for the image.
68       */
69      private String border;
70  
71      /**
72       * The width to use for the image.
73       */
74      private String width;
75  
76      /**
77       * The height to use for the image.
78       */
79      private String height;
80  
81      /**
82       * Where the new document will be displayed when the user
83       * follows a link, i.e. _blank opens the new document in a new
84       * window.
85       */
86      private String target;
87  
88      /**
89       * The title to use for the image.
90       */
91      private String title;
92  
93  
94        //-----------/
95       //- Methods -/
96      //-----------/
97  
98      /**
99       * Method clone.
100      * 
101      * @return LinkItem
102      */
103     public LinkItem clone()
104     {
105         try
106         {
107             LinkItem copy = (LinkItem) super.clone();
108 
109             return copy;
110         }
111         catch ( java.lang.Exception ex )
112         {
113             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
114                 + " does not support clone()" ).initCause( ex );
115         }
116     } //-- LinkItem clone()
117 
118     /**
119      * Method equals.
120      * 
121      * @param other a other object.
122      * @return boolean
123      */
124     public boolean equals( Object other )
125     {
126         if ( this == other )
127         {
128             return true;
129         }
130 
131         if ( !( other instanceof LinkItem ) )
132         {
133             return false;
134         }
135 
136         LinkItem that = (LinkItem) other;
137         boolean result = true;
138 
139         result = result && ( getName() == null ? that.getName() == null : getName().equals( that.getName() ) );
140         result = result && ( getHref() == null ? that.getHref() == null : getHref().equals( that.getHref() ) );
141         result = result && ( getImg() == null ? that.getImg() == null : getImg().equals( that.getImg() ) );
142         result = result && ( getPosition() == null ? that.getPosition() == null : getPosition().equals( that.getPosition() ) );
143         result = result && ( getAlt() == null ? that.getAlt() == null : getAlt().equals( that.getAlt() ) );
144         result = result && ( getBorder() == null ? that.getBorder() == null : getBorder().equals( that.getBorder() ) );
145         result = result && ( getWidth() == null ? that.getWidth() == null : getWidth().equals( that.getWidth() ) );
146         result = result && ( getHeight() == null ? that.getHeight() == null : getHeight().equals( that.getHeight() ) );
147         result = result && ( getTarget() == null ? that.getTarget() == null : getTarget().equals( that.getTarget() ) );
148         result = result && ( getTitle() == null ? that.getTitle() == null : getTitle().equals( that.getTitle() ) );
149 
150         return result;
151     } //-- boolean equals( Object )
152 
153     /**
154      * Get the alt to use for the image.
155      * 
156      * @return String
157      */
158     public String getAlt()
159     {
160         return this.alt;
161     } //-- String getAlt()
162 
163     /**
164      * Get the border to use for the image.
165      * 
166      * @return String
167      */
168     public String getBorder()
169     {
170         return this.border;
171     } //-- String getBorder()
172 
173     /**
174      * Get the height to use for the image.
175      * 
176      * @return String
177      */
178     public String getHeight()
179     {
180         return this.height;
181     } //-- String getHeight()
182 
183     /**
184      * Get the href to use for the link.
185      * 
186      * @return String
187      */
188     public String getHref()
189     {
190         return this.href;
191     } //-- String getHref()
192 
193     /**
194      * Get the source location of an image.
195      * 
196      * @return String
197      */
198     public String getImg()
199     {
200         return this.img;
201     } //-- String getImg()
202 
203     /**
204      * Get the name to display for the link.
205      * 
206      * @return String
207      */
208     public String getName()
209     {
210         return this.name;
211     } //-- String getName()
212 
213     /**
214      * Get where to place the image regarding the displayed name
215      * (left or right).
216      * 
217      * @return String
218      */
219     public String getPosition()
220     {
221         return this.position;
222     } //-- String getPosition()
223 
224     /**
225      * Get where the new document will be displayed when the user
226      * follows a link, i.e. _blank opens the new document in a new
227      * window.
228      * 
229      * @return String
230      */
231     public String getTarget()
232     {
233         return this.target;
234     } //-- String getTarget()
235 
236     /**
237      * Get the title to use for the image.
238      * 
239      * @return String
240      */
241     public String getTitle()
242     {
243         return this.title;
244     } //-- String getTitle()
245 
246     /**
247      * Get the width to use for the image.
248      * 
249      * @return String
250      */
251     public String getWidth()
252     {
253         return this.width;
254     } //-- String getWidth()
255 
256     /**
257      * Method hashCode.
258      * 
259      * @return int
260      */
261     public int hashCode()
262     {
263         int result = 17;
264 
265         result = 37 * result + ( name != null ? name.hashCode() : 0 );
266         result = 37 * result + ( href != null ? href.hashCode() : 0 );
267         result = 37 * result + ( img != null ? img.hashCode() : 0 );
268         result = 37 * result + ( position != null ? position.hashCode() : 0 );
269         result = 37 * result + ( alt != null ? alt.hashCode() : 0 );
270         result = 37 * result + ( border != null ? border.hashCode() : 0 );
271         result = 37 * result + ( width != null ? width.hashCode() : 0 );
272         result = 37 * result + ( height != null ? height.hashCode() : 0 );
273         result = 37 * result + ( target != null ? target.hashCode() : 0 );
274         result = 37 * result + ( title != null ? title.hashCode() : 0 );
275 
276         return result;
277     } //-- int hashCode()
278 
279     /**
280      * Set the alt to use for the image.
281      * 
282      * @param alt a alt object.
283      */
284     public void setAlt( String alt )
285     {
286         this.alt = alt;
287     } //-- void setAlt( String )
288 
289     /**
290      * Set the border to use for the image.
291      * 
292      * @param border a border object.
293      */
294     public void setBorder( String border )
295     {
296         this.border = border;
297     } //-- void setBorder( String )
298 
299     /**
300      * Set the height to use for the image.
301      * 
302      * @param height a height object.
303      */
304     public void setHeight( String height )
305     {
306         this.height = height;
307     } //-- void setHeight( String )
308 
309     /**
310      * Set the href to use for the link.
311      * 
312      * @param href a href object.
313      */
314     public void setHref( String href )
315     {
316         this.href = href;
317     } //-- void setHref( String )
318 
319     /**
320      * Set the source location of an image.
321      * 
322      * @param img a img object.
323      */
324     public void setImg( String img )
325     {
326         this.img = img;
327     } //-- void setImg( String )
328 
329     /**
330      * Set the name to display for the link.
331      * 
332      * @param name a name object.
333      */
334     public void setName( String name )
335     {
336         this.name = name;
337     } //-- void setName( String )
338 
339     /**
340      * Set where to place the image regarding the displayed name
341      * (left or right).
342      * 
343      * @param position a position object.
344      */
345     public void setPosition( String position )
346     {
347         this.position = position;
348     } //-- void setPosition( String )
349 
350     /**
351      * Set where the new document will be displayed when the user
352      * follows a link, i.e. _blank opens the new document in a new
353      * window.
354      * 
355      * @param target a target object.
356      */
357     public void setTarget( String target )
358     {
359         this.target = target;
360     } //-- void setTarget( String )
361 
362     /**
363      * Set the title to use for the image.
364      * 
365      * @param title a title object.
366      */
367     public void setTitle( String title )
368     {
369         this.title = title;
370     } //-- void setTitle( String )
371 
372     /**
373      * Set the width to use for the image.
374      * 
375      * @param width a width object.
376      */
377     public void setWidth( String width )
378     {
379         this.width = width;
380     } //-- void setWidth( String )
381 
382     /**
383      * Method toString.
384      * 
385      * @return String
386      */
387     public java.lang.String toString()
388     {
389         StringBuilder buf = new StringBuilder( 128 );
390 
391         buf.append( "name = '" );
392         buf.append( getName() );
393         buf.append( "'" );
394         buf.append( "\n" ); 
395         buf.append( "href = '" );
396         buf.append( getHref() );
397         buf.append( "'" );
398         buf.append( "\n" ); 
399         buf.append( "img = '" );
400         buf.append( getImg() );
401         buf.append( "'" );
402         buf.append( "\n" ); 
403         buf.append( "position = '" );
404         buf.append( getPosition() );
405         buf.append( "'" );
406         buf.append( "\n" ); 
407         buf.append( "alt = '" );
408         buf.append( getAlt() );
409         buf.append( "'" );
410         buf.append( "\n" ); 
411         buf.append( "border = '" );
412         buf.append( getBorder() );
413         buf.append( "'" );
414         buf.append( "\n" ); 
415         buf.append( "width = '" );
416         buf.append( getWidth() );
417         buf.append( "'" );
418         buf.append( "\n" ); 
419         buf.append( "height = '" );
420         buf.append( getHeight() );
421         buf.append( "'" );
422         buf.append( "\n" ); 
423         buf.append( "target = '" );
424         buf.append( getTarget() );
425         buf.append( "'" );
426         buf.append( "\n" ); 
427         buf.append( "title = '" );
428         buf.append( getTitle() );
429         buf.append( "'" );
430 
431         return buf.toString();
432     } //-- java.lang.String toString()
433 
434 }