de.mguennewig.pobjects.metadata
Class ISSNType
java.lang.Object
de.mguennewig.pobjects.metadata.AbstractType
de.mguennewig.pobjects.metadata.ScalarType
de.mguennewig.pobjects.metadata.StringType
de.mguennewig.pobjects.metadata.ISSNType
- All Implemented Interfaces:
- Type
public final class ISSNType
- extends StringType
International Standard Serial Number or short ISSN.
The format of the ISSN is an eight digit number, divided by a
hyphen into two four digit numbers. The last digit, which may be
0-9 or an X, is a check digit.
- Author:
- Michael Günnewig
|
Constructor Summary |
ISSNType()
Creates a new ISSN type. |
ISSNType(int size)
Creates a new ISSN type. |
ISSNType(int size,
int restrictTo,
java.lang.String pattern,
int minLength)
Creates a new ISSN type. |
|
Method Summary |
static int |
checksum(java.lang.String issn)
Computes the ISSN checksum. |
void |
checkSyntax(java.lang.String value)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ISSN_PATTERN
public static final java.lang.String ISSN_PATTERN
- See Also:
- Constant Field Values
ISSN_LENGTH
public static final int ISSN_LENGTH
- See Also:
- Constant Field Values
ISSNType
public ISSNType()
- Creates a new ISSN type.
ISSNType
public ISSNType(int size)
- Creates a new ISSN type.
ISSNType
public ISSNType(int size,
int restrictTo,
java.lang.String pattern,
int minLength)
- Creates a new ISSN type.
checksum
public static int checksum(java.lang.String issn)
- Computes the ISSN checksum.
This works just like the ISBN checksum, with the slight difference that
the weights start at 8 and decrease.
checkSyntax
public void checkSyntax(java.lang.String value)
throws PObjSyntaxException
-
- Specified by:
checkSyntax in interface Type- Overrides:
checkSyntax in class StringType
- Throws:
PObjSyntaxException