edu.stanford.nlp.dbm
Class MedlineDocument

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.ArrayList
                    |
                    +--edu.stanford.nlp.dbm.BasicDocument
                          |
                          +--edu.stanford.nlp.dbm.MedlineDocument
All Implemented Interfaces:
Cloneable, Collection, Datum, Document, Featurizable, Labeled, List, RandomAccess, Serializable

public class MedlineDocument
extends BasicDocument

A Medline Document in Medline XML Format. The labels are the MeSH terms.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class edu.stanford.nlp.dbm.BasicDocument
labels, originalText, title
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
MedlineDocument()
           
 
Method Summary
 Collection labels()
          Returns the complete List of labels for this Document.
protected  void parse(String text)
          Parses an xml document and sets class-level variables title, text, and MeSH.
 String text()
          Returns text of document.
 String title()
          Returns title of document.
 
Methods inherited from class edu.stanford.nlp.dbm.BasicDocument
addLabel, asFeatures, init, init, init, init, init, init, init, init, init, init, init, init, init, init, init, init, init, init, init, label, main, originalText, presentableText, setLabel, setLabels, setTitle
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, remove, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

MedlineDocument

public MedlineDocument()
Method Detail

parse

protected void parse(String text)
Parses an xml document and sets class-level variables title, text, and MeSH. Should I call this setValues? Or for consistency, setDefault?

Overrides:
parse in class BasicDocument

title

public String title()
Returns title of document. The title of every Medline document is delimited by example: A woman with nodules in her lungs

Specified by:
title in interface Document
Overrides:
title in class BasicDocument

text

public String text()
Returns text of document. The abstract texts of Medline documents are delimited by The lines following .W until the end of the document are all part of the abstract getText parses these lines to get the text


labels

public Collection labels()
Description copied from class: BasicDocument
Returns the complete List of labels for this Document. This is an empty collection if none have been set.

Specified by:
labels in interface Labeled
Overrides:
labels in class BasicDocument
Returns:
A Collection of the Object's labels. Returns an empty Collection if there are no labels.


Stanford NLP Group