public class ISMN extends StandardNumber implements java.lang.Cloneable, java.lang.Comparable<ISMN>
ISO 10957 International Standard Music Number (ISMN), Z39.50 BIB-1 Use Attribute 1092.
The International Standard Music Number (ISMN) is a thirteen-character alphanumeric identifier for printed music developed by ISO. The original proposal for an ISMN was made by the UK Branch of IAML (International Association of Music Libraries, Archives and Documentation Centres).
The original format comprised four elements: a distinguishing prefix M, a publisher ID, an item ID and a check digit, typically looking like M-2306-7118-7.
From 1 January 2008 the ISMN was defined as a thirteen digit identifier beginning 979-0 where the zero replaced M in the old-style number. The resulting number is identical with its EAN-13 number as encoded in the item’s barcode.
See ISMN Manual 2008
type, value
Constructor and Description |
---|
ISMN() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a clone if the implementation is cloneable.
|
int |
compareTo(ISMN ismn) |
ISMN |
createChecksum(boolean createWithChecksum)
Indicate that a correct check sum should be computed.
|
boolean |
equals(java.lang.Object object) |
java.lang.String |
format()
Return a formatted value of this standard number
This is best for human-readable representation, but is
not necessarily a format for computation.
|
static StandardNumber |
getInstance(java.lang.Package thePackage,
java.lang.ClassLoader classLoader,
java.lang.String type) |
static StandardNumber |
getInstance(java.lang.String type) |
java.util.Collection<java.lang.String> |
getTypedVariants() |
int |
hashCode() |
boolean |
isValid()
Check this number for validity.
|
ISMN |
normalize()
Normalize the value by removing all unwanted characters or
replacing characters with the ones required for verification.
|
java.lang.String |
normalizedValue()
Return normalized value of this standard number.
|
ISMN |
reset() |
GTIN |
toGTIN() |
ISMN |
verify()
Verify the number.
|
set, type
public int compareTo(ISMN ismn)
compareTo
in interface java.lang.Comparable<ISMN>
public ISMN createChecksum(boolean createWithChecksum)
StandardNumber
Indicate that a correct check sum should be computed.
createChecksum
in class StandardNumber
createWithChecksum
- if checksum is includedpublic ISMN normalize()
StandardNumber
Normalize the value by removing all unwanted characters or replacing characters with the ones required for verification.
normalize
in class StandardNumber
public boolean isValid()
StandardNumber
Check this number for validity.
isValid
in class StandardNumber
public ISMN verify()
StandardNumber
Verify the number.
verify
in class StandardNumber
public java.lang.String normalizedValue()
StandardNumber
Return normalized value of this standard number. In most cases, this is also the canonical form of the standard number. This is a representation without unneccessary characters, useful for computation purposes, like comparing for equivalence.
normalizedValue
in class StandardNumber
public java.lang.String format()
StandardNumber
Return a formatted value of this standard number This is best for human-readable representation, but is not necessarily a format for computation.
format
in class StandardNumber
public ISMN reset()
reset
in class StandardNumber
public java.util.Collection<java.lang.String> getTypedVariants()
getTypedVariants
in class StandardNumber
public GTIN toGTIN() throws NoSuchStandardNumberException, java.lang.NumberFormatException
NoSuchStandardNumberException
java.lang.NumberFormatException
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
- if this is called on an
implementation that does not support `Cloneable`public static StandardNumber getInstance(java.lang.String type) throws NoSuchStandardNumberException
NoSuchStandardNumberException
public static StandardNumber getInstance(java.lang.Package thePackage, java.lang.ClassLoader classLoader, java.lang.String type) throws NoSuchStandardNumberException
NoSuchStandardNumberException