## org.biojavax
Class SimpleDocRefAuthor

    java.lang.Object
      org.biojava.utils.Unchangeable
          org.biojavax.SimpleDocRefAuthor

All Implemented Interfaces:
  Comparable, Changeable, DocRefAuthor

    public class SimpleDocRefAuthor

extends Unchangeable
implements DocRefAuthor

Represents an author of a documentary reference.

Since:
  1.5
Author:
  Richard Holland, George Waldon
See Also:
  `DocRef`

Nested Class Summary

Nested classes/interfaces inherited from interface org.biojavax.DocRefAuthor
`DocRefAuthor.Tools`

Constructor Summary
`SimpleDocRefAuthor(String s)` Constructs a new author instance from a string.
`SimpleDocRefAuthor(String name, boolean consortium, boolean editor)` Constructs a new author instance.

Method Summary
`int` `compareTo(Object o)` Document authors are compared first by name, then consortium status, then editor status.
`boolean` `equals(Object obj)` Document references are equal if they have all fields the same.
`String` `getExtendedName()` Returns the extended version of the authors name.
`String` `getName()` Returns a textual description of the authors name.
`int` `hashCode()`
`boolean` `isConsortium()` Is this author actually a consortium?
`boolean` `isEditor()` Is this author actually an editor?
`String` `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, removeForwarder`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.biojava.utils.Changeable
`addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener`

Constructor Detail

### SimpleDocRefAuthor

    public SimpleDocRefAuthor(String name,
                              boolean consortium,
                              boolean editor)

  Constructs a new author instance.

  Parameters:
    `name` - the author name
    `consortium` - are they a consortium?
    `editor` - are they an editor?

### SimpleDocRefAuthor

    public SimpleDocRefAuthor(String s)

  Constructs a new author instance from a string.

  Parameters:
    `s` - the input string (author name with (ed.) and (consortium) suffixes).

Method Detail

### getName

    public String 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:
    `getName` in interface `DocRefAuthor`
  Returns:
    Value of property name.

### getExtendedName

    public String getExtendedName()

  Returns the extended version of the authors name. Form: "name (consortium) (ed.)" where sections in brackets are optional.

  Specified by:
    `getExtendedName` in interface `DocRefAuthor`
  Returns:
    Value of property name with additions.

### isEditor

    public boolean isEditor()

  Is this author actually an editor?

  Specified by:
    `isEditor` in interface `DocRefAuthor`
  Returns:
    true if they are, false if not.

### isConsortium

    public boolean isConsortium()

  Is this author actually a consortium?

  Specified by:
    `isConsortium` in interface `DocRefAuthor`
  Returns:
    true if they are, false if not.

### compareTo

    public int compareTo(Object o)

  Document authors are compared first by name, then consortium status, then editor status.

  Specified by:
    `compareTo` in interface `Comparable`

### equals

    public boolean equals(Object obj)

  Document references are equal if they have all fields the same.

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Form: "name (consortium) (ed.)" where sections in brackets are optional.

  Overrides:
    `toString` in class `Object`