1 /* 2 * dpkg - Debian Package library and the Debian Package Maven plugin 3 * (c) Copyright 2015 Gerrit Hohl 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * as published by the Free Software Foundation; either version 2 8 * of the License, or (at your option) any later version. 9 * 10 * This program is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 */ 19 package net.sourceforge.javadpkg.control; 20 21 22 /** 23 * <p> 24 * The version number of a package. 25 * </p> 26 * <p> 27 * See <a href= 28 * "https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version"> 29 * 5.6.12 Version</a> for further information. 30 * </p> 31 * 32 * @author Gerrit Hohl (gerrit-hohl@users.sourceforge.net) 33 * @version <b>1.0</b>, 31.12.2015 by Gerrit Hohl 34 */ 35 public interface PackageVersion { 36 37 38 /** 39 * <p> 40 * Returns the epoch of the version. 41 * </p> 42 * <p> 43 * This is a single (generally small) unsigned integer. It may be omitted, 44 * in which case zero is assumed. If it is omitted then the 45 * <i>upstream_version</i> may not contain any colons. 46 * </p> 47 * 48 * @return The epoch or <code>null</code>, if the version doesn't have any 49 * epoch. 50 */ 51 String getEpoch(); 52 53 54 /** 55 * <p> 56 * Returns the upstream version which is the main part of the version 57 * number. 58 * </p> 59 * <p> 60 * It is usually the version number of the original ("upstream") package 61 * from which the Debian package file has been made, if this is applicable. 62 * </p> 63 * 64 * @return The upstream version. 65 */ 66 String getUpstreamVersion(); 67 68 69 /** 70 * <p> 71 * Returns the version of the Debian package based on the upstream version. 72 * </p> 73 * 74 * @return The Debian revision or <code>null</code>, if the version doesn't 75 * have any Debian revision. 76 */ 77 String getDebianRevision(); 78 79 80 /** 81 * <p> 82 * Returns the version as text. 83 * </p> 84 * This method returns a textual representation of the version. This 85 * includes the epoch, the upstream version and the Debian revision. 86 * </p> 87 * 88 * @return The name. 89 */ 90 String getText(); 91 92 93 }