Package org.biojavax
Class SimpleDocRefAuthor
java.lang.Object
org.biojava.utils.Unchangeable
org.biojavax.SimpleDocRefAuthor
- All Implemented Interfaces:
Comparable,Changeable,DocRefAuthor
Represents an author of a documentary reference.
- Since:
- 1.5
- Author:
- Richard Holland, George Waldon
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.biojavax.DocRefAuthor
DocRefAuthor.Tools -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new author instance from a string.SimpleDocRefAuthor(String name, boolean consortium, boolean editor) Constructs a new author instance. -
Method Summary
Modifier and TypeMethodDescriptionintDocument authors are compared first by name, then consortium status, then editor status.booleanDocument references are equal if they have all fields the same.Returns the extended version of the authors name.getName()Returns a textual description of the authors name.inthashCode()booleanIs this author actually a consortium?booleanisEditor()Is this author actually an editor?toString()Form: "name (consortium) (ed.)" where sections in brackets are optional.Methods inherited from class org.biojava.utils.Unchangeable
addChangeListener, addChangeListener, addForwarder, getForwarders, getListeners, isUnchanging, removeChangeListener, removeChangeListener, removeForwarderMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
-
Constructor Details
-
SimpleDocRefAuthor
Constructs a new author instance.- Parameters:
name- the author nameconsortium- are they a consortium?editor- are they an editor?
-
SimpleDocRefAuthor
Constructs a new author instance from a string.- Parameters:
s- the input string (author name with (ed.) and (consortium) suffixes).
-
-
Method Details
-
getName
Returns a textual description of the authors name. This field is immutable so should be set using the constructor of the implementing class.- Specified by:
getNamein interfaceDocRefAuthor- Returns:
- Value of property name.
-
getExtendedName
Returns the extended version of the authors name. Form: "name (consortium) (ed.)" where sections in brackets are optional.- Specified by:
getExtendedNamein interfaceDocRefAuthor- Returns:
- Value of property name with additions.
-
isEditor
Is this author actually an editor?- Specified by:
isEditorin interfaceDocRefAuthor- Returns:
- true if they are, false if not.
-
isConsortium
Is this author actually a consortium?- Specified by:
isConsortiumin interfaceDocRefAuthor- Returns:
- true if they are, false if not.
-
compareTo
Document authors are compared first by name, then consortium status, then editor status.- Specified by:
compareToin interfaceComparable
-
equals
Document references are equal if they have all fields the same. -
hashCode
-
toString
Form: "name (consortium) (ed.)" where sections in brackets are optional.
-