Package nl.siegmann.epublib.domain
Class Identifier
java.lang.Object
nl.siegmann.epublib.domain.Identifier
- All Implemented Interfaces:
Serializable
A Book's identifier.
Defaults to a random UUID and scheme "UUID"
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an Identifier with as value a random UUID and scheme "UUID"Identifier(String scheme, String value) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic IdentifiergetBookIdIdentifier(List<Identifier> identifiers) The first identifier for which the bookId is true is made the bookId identifier.getValue()inthashCode()booleanisBookId()This bookId property allows the book creator to add multiple ids and tell the epubwriter which one to write out as the bookId.voidsetBookId(boolean bookId) voidvoidtoString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
bookId
private boolean bookId -
scheme
-
value
-
-
Constructor Details
-
Identifier
public Identifier()Creates an Identifier with as value a random UUID and scheme "UUID" -
Identifier
-
-
Method Details
-
getBookIdIdentifier
The first identifier for which the bookId is true is made the bookId identifier. If no identifier has bookId == true then the first bookId identifier is written as the primary.- Parameters:
identifiers-- Returns:
- The first identifier for which the bookId is true is made the bookId identifier.
-
getScheme
-
setScheme
-
getValue
-
setValue
-
setBookId
public void setBookId(boolean bookId) -
isBookId
public boolean isBookId()This bookId property allows the book creator to add multiple ids and tell the epubwriter which one to write out as the bookId. The Dublin Core metadata spec allows multiple identifiers for a Book. The epub spec requires exactly one identifier to be marked as the book id.- Returns:
- whether this is the unique book id.
-
hashCode
public int hashCode() -
equals
-
toString
-