Coverage Report - org.apache.maven.model.RepositoryBase
 
Classes in this File Line Coverage Branch Coverage Complexity
RepositoryBase
35%
7/20
75%
3/4
1,444
 
 1  
 /*
 2  
  =================== DO NOT EDIT THIS FILE ====================
 3  
  Generated by Modello 1.0.1 on 2009-03-28 16:09:53,
 4  
  any modifications will be overwritten.
 5  
  ==============================================================
 6  
  */
 7  
 
 8  
 package org.apache.maven.model;
 9  
 
 10  
 /**
 11  
  * A repository contains the information needed for establishing
 12  
  * connections with
 13  
  *         remote repository.
 14  
  * 
 15  
  * @version $Revision$ $Date$
 16  
  */
 17  8
 public class RepositoryBase
 18  
     implements java.io.Serializable
 19  
 {
 20  
 
 21  
       //--------------------------/
 22  
      //- Class/Member Variables -/
 23  
     //--------------------------/
 24  
 
 25  
     /**
 26  
      * 
 27  
      *             
 28  
      *             A unique identifier for a repository. This is
 29  
      * used to match the repository
 30  
      *             to configuration in the
 31  
      * <code>settings.xml</code> file, for example.
 32  
      *             
 33  
      *           
 34  
      */
 35  
     private String id;
 36  
 
 37  
     /**
 38  
      * Human readable name of the repository.
 39  
      */
 40  
     private String name;
 41  
 
 42  
     /**
 43  
      * 
 44  
      *             
 45  
      *             The url of the repository, in the form
 46  
      * <code>protocol://hostname/path</code>.
 47  
      *             
 48  
      *           
 49  
      */
 50  
     private String url;
 51  
 
 52  
     /**
 53  
      * 
 54  
      *             
 55  
      *             The type of layout this repository uses for
 56  
      * locating and storing artifacts -
 57  
      *             can be <code>legacy</code> or
 58  
      * <code>default</code>.
 59  
      *             
 60  
      *           
 61  
      */
 62  8
     private String layout = "default";
 63  
 
 64  
 
 65  
       //-----------/
 66  
      //- Methods -/
 67  
     //-----------/
 68  
 
 69  
     /**
 70  
      * Get a unique identifier for a repository. This is used to
 71  
      * match the repository
 72  
      *             to configuration in the
 73  
      * <code>settings.xml</code> file, for example.
 74  
      * 
 75  
      * @return String
 76  
      */
 77  
     public String getId()
 78  
     {
 79  0
         return this.id;
 80  
     } //-- String getId()
 81  
 
 82  
     /**
 83  
      * Get the type of layout this repository uses for locating and
 84  
      * storing artifacts -
 85  
      *             can be <code>legacy</code> or
 86  
      * <code>default</code>.
 87  
      * 
 88  
      * @return String
 89  
      */
 90  
     public String getLayout()
 91  
     {
 92  0
         return this.layout;
 93  
     } //-- String getLayout()
 94  
 
 95  
     /**
 96  
      * Get human readable name of the repository.
 97  
      * 
 98  
      * @return String
 99  
      */
 100  
     public String getName()
 101  
     {
 102  0
         return this.name;
 103  
     } //-- String getName()
 104  
 
 105  
     /**
 106  
      * Get the url of the repository, in the form
 107  
      * <code>protocol://hostname/path</code>.
 108  
      * 
 109  
      * @return String
 110  
      */
 111  
     public String getUrl()
 112  
     {
 113  0
         return this.url;
 114  
     } //-- String getUrl()
 115  
 
 116  
     /**
 117  
      * Set a unique identifier for a repository. This is used to
 118  
      * match the repository
 119  
      *             to configuration in the
 120  
      * <code>settings.xml</code> file, for example.
 121  
      * 
 122  
      * @param id
 123  
      */
 124  
     public void setId( String id )
 125  
     {
 126  0
         this.id = id;
 127  0
     } //-- void setId( String )
 128  
 
 129  
     /**
 130  
      * Set the type of layout this repository uses for locating and
 131  
      * storing artifacts -
 132  
      *             can be <code>legacy</code> or
 133  
      * <code>default</code>.
 134  
      * 
 135  
      * @param layout
 136  
      */
 137  
     public void setLayout( String layout )
 138  
     {
 139  0
         this.layout = layout;
 140  0
     } //-- void setLayout( String )
 141  
 
 142  
     /**
 143  
      * Set human readable name of the repository.
 144  
      * 
 145  
      * @param name
 146  
      */
 147  
     public void setName( String name )
 148  
     {
 149  0
         this.name = name;
 150  0
     } //-- void setName( String )
 151  
 
 152  
     /**
 153  
      * Set the url of the repository, in the form
 154  
      * <code>protocol://hostname/path</code>.
 155  
      * 
 156  
      * @param url
 157  
      */
 158  
     public void setUrl( String url )
 159  
     {
 160  0
         this.url = url;
 161  0
     } //-- void setUrl( String )
 162  
 
 163  
 
 164  
             
 165  
     /**
 166  
      * @see java.lang.Object#equals(java.lang.Object)
 167  
      */
 168  
     public boolean equals( Object obj )
 169  
     {
 170  4
         if ( obj instanceof RepositoryBase ) {
 171  
 
 172  2
             final RepositoryBase other =  (RepositoryBase) obj;
 173  
 
 174  2
             if ( id != null )
 175  
             {
 176  0
                 return id.equals( other.id );
 177  
             }
 178  2
             return super.equals(obj);
 179  
         }
 180  
 
 181  2
         return false;
 182  
     }
 183  
             
 184  
           
 185  
 }