com.aliasi.medline
Class PubDate

java.lang.Object
  extended by com.aliasi.medline.PubDate

Deprecated. Moved to lingmed sandbox project.

@Deprecated
public class PubDate
extends Object

A PubDate represents a publication date in a semi-structured or unstructured format. Publication dates may appear in structured form if they can be broken down into year with an optional season, optional month, and optional day. Some journal publication dates cover date ranges, etc. In these cases, dates are presented as plain text. Examples that are not structured in MEDLINE are (e.g. 1998 Dec-1999 Jan or 2000 Nov-Dec or 2000 Spring-Summer).

Since:
LingPipe3.9
Version:
3.9.1
Author:
Bob Carpenter

Method Summary
 String day()
          Deprecated. Returns the day for this date, or the empty (zero length) string if none was specified.
 boolean isStructured()
          Deprecated. Returns true if this date was provided with year, season, month and/or day structure.
 String medlineDate()
          Deprecated. Returns a string representing an unstructured date if the date is not structured and returns an empty (zero length) string otherwise.
 String month()
          Deprecated. Returns the month for this date, or the empty (zero length) string if none was specified.
 String season()
          Deprecated. Returns the season for this date, or the empty (zero length) string if none was specified.
 String toPlainString()
          Deprecated. Returns a plain string representation of this publication date without field information.
 String toString()
          Deprecated. Returns a string-based representation of this publication date.
 String year()
          Deprecated. Returns the year for structured dates, and the empty (zero length) string otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

isStructured

public boolean isStructured()
Deprecated. 
Returns true if this date was provided with year, season, month and/or day structure. If the date is not structured, the method medlineDate() will return the unstructured text. Otherwise, the year, season, month and day accessor methods should be queried.

Returns:
true if this date is structured.

medlineDate

public String medlineDate()
Deprecated. 
Returns a string representing an unstructured date if the date is not structured and returns an empty (zero length) string otherwise. This method will return a non-empty value if isStructured() returns true.

Returns:
The unstructured date as a string.

year

public String year()
Deprecated. 
Returns the year for structured dates, and the empty (zero length) string otherwise. This method will return a non-empty result for structured dates. The method isStructured() can be used to test if this date is structured.

Returns:
The year for this date.

season

public String season()
Deprecated. 
Returns the season for this date, or the empty (zero length) string if none was specified. A structured date optionally specifies a season.

Returns:
The season for this date.

month

public String month()
Deprecated. 
Returns the month for this date, or the empty (zero length) string if none was specified. A structured date optionally specifies a month.

Returns:
The month for this date.

day

public String day()
Deprecated. 
Returns the day for this date, or the empty (zero length) string if none was specified. A structured date optionally specifies a day.

Returns:
The day for this date.

toPlainString

public String toPlainString()
Deprecated. 
Returns a plain string representation of this publication date without field information. The format returned is either a MEDLINE date or (Day ' ') (Month ' ') (Season ' ') Year.

Returns:
Plain string representation of date.

toString

public String toString()
Deprecated. 
Returns a string-based representation of this publication date.

Overrides:
toString in class Object
Returns:
A string-based representation of this publication date.