View Javadoc

1   package net.sf.jpkgmk.pkgmap;
2   
3   
4   /**
5    * @author gommma (gommma AT users.sourceforge.net)
6    * @author Last changed by: $Author: gommma $
7    * @version $Revision: 2 $ $Date: 2008-08-20 21:14:19 +0200 (Mi, 20 Aug 2008) $
8    * @since 1.0
9    */
10  public class PkgMapEntryInfo extends AbstractPkgMapEntry {
11  
12  	/**
13  	 * Constructor taking the mandatory arguments to create a file entry
14  	 * @param path
15  	 */
16  	public PkgMapEntryInfo(String path)
17  	{
18  		this(null, path);
19  	}
20  
21  	/**
22  	 * Full constructor taking all arguments supported for this entry type
23  	 * @param part
24  	 * @param path path to the file or directory
25  	 */
26  	public PkgMapEntryInfo(Integer part, String path)
27  	{
28  		super(part, PkgMapEntryType.FILE_INFO, null, path, null, null, null, null, null, null);
29  		
30  		// Mandatory parameter check
31  		if(path == null) {
32  			throw new NullPointerException("The parameter 'path' must not be null");
33  		}
34  	}
35  
36  	public static class PkgMapEntryInfoParser extends AbstractPkgMapEntryParser
37  	{
38  		@Override
39  		protected PkgMapEntry parseItems(String[] items, Integer part, PkgMapEntryType type, int currentIndex)
40  		{			
41  			String path = items[currentIndex];
42  			return new PkgMapEntryInfo(part, path);
43  		}
44  	}
45  
46  }