|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectedu.northwestern.at.monk.model.TaggedObject
edu.northwestern.at.monk.model.CoreObject
edu.northwestern.at.monk.model.WorkPart
public class WorkPart
A work part.
| Nested Class Summary | |
|---|---|
static class |
WorkPart.Comparator
A multi-column work part comparator. |
static class |
WorkPart.SortOption
Work part sorting options. |
| Method Summary | ||
|---|---|---|
int |
compareTo(WorkPart other)
Compares this instance with another. |
|
static
|
find(java.util.Collection<SearchCriterion> criteria)
Finds work parts. |
|
static
|
find(SearchCriteria criteria)
Finds work parts. |
|
static
|
find(SearchCriterion... criteria)
Finds work parts. |
|
static WorkPart |
get(java.lang.String tag)
Gets a work part by tag. |
|
java.lang.String |
getAdornedXml()
Gets the XML for the work part. |
|
static
|
getAll()
Gets all the work parts. |
|
java.util.List<WorkPart> |
getChildren()
Gets the children. |
|
java.util.Collection<WorkPart> |
getDescendants()
Gets the descendants. |
|
java.lang.String |
getHtmlText()
Gets the HTML text for the work part. |
|
int |
getLevel()
Gets the level. |
|
WorkPart |
getNextWorkPartWithText()
Gets the next work part with text. |
|
int |
getNumChildren()
Gets the number of children. |
|
long |
getNumSentences(CumKind cumKind)
Gets the number of sentences. |
|
long |
getNumSentencesMain(CumKind cumKind)
Gets the number of sentences in main text. |
|
long |
getNumWordBigrams(CumKind cumKind)
Gets the number of word bigrams. |
|
long |
getNumWordBigramsMain(CumKind cumKind)
Gets the number of word bigrams in main text. |
|
long |
getNumWordPartBigrams(CumKind cumKind)
Gets the number of word part bigrams. |
|
long |
getNumWordPartBigramsMain(CumKind cumKind)
Gets the number of word part bigrams in main text. |
|
long |
getNumWordParts(CumKind cumKind)
Gets the number of word parts. |
|
long |
getNumWordPartsMain(CumKind cumKind)
Gets the number of word parts in main text. |
|
long |
getNumWordPartTrigrams(CumKind cumKind)
Gets the number of word part trigrams. |
|
long |
getNumWordPartTrigramsMain(CumKind cumKind)
Gets the number of word part trigrams in main text. |
|
long |
getNumWords(CumKind cumKind)
Gets the number of words. |
|
long |
getNumWordsMain(CumKind cumKind)
Gets the number of words in main text. |
|
long |
getNumWordTrigrams(CumKind cumKind)
Gets the number of word trigrams. |
|
long |
getNumWordTrigramsMain(CumKind cumKind)
Gets the number of word trigrams in main text. |
|
WorkPart |
getParent()
Gets the parent. |
|
WorkPart |
getPrevWorkPartWithText()
Gets the previous work part with text. |
|
long |
getSummaryCount(CumKind cumKind,
FeatureKind featureKind,
Arity arity,
MainKind mainKind)
Gets a summary count. |
|
SummaryCounts |
getSummaryCounts(CumKind cumKind)
Gets the summary counts. |
|
SummaryCounts |
getSummaryCountsCum()
Gets the cumulative summary counts. |
|
SummaryCounts |
getSummaryCountsNonCum()
Gets the non-cumulative summary counts. |
|
java.lang.String |
getTitle()
Gets the title. |
|
java.lang.String |
getType()
Gets the type. |
|
java.lang.String |
getUnadornedXml()
Gets the unadorned XML for the work part. |
|
WordPart[] |
getWordParts()
Gets the word parts in the work part. |
|
Word[] |
getWords()
Gets the words in the work part. |
|
Work |
getWork()
Gets the work. |
|
int |
getWorkOrdinal()
Gets the work ordinal. |
|
boolean |
hasChildren()
Returns true if the work part has children. |
|
boolean |
hasText()
Returns true if the work part has text. |
|
boolean |
hasWords()
Returns true if the work part has tagged words. |
|
static WorkPart[] |
sort(java.util.Collection<WorkPart> collection,
WorkPart.SortOption... options)
Sorts a collection of work parts. |
|
static void |
sort(WorkPart[] array,
WorkPart.SortOption... options)
Sorts an array of work parts. |
|
| Methods inherited from class edu.northwestern.at.monk.model.TaggedObject |
|---|
getTag |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static WorkPart get(java.lang.String tag)
tag - Tag.
public static <T extends WorkPart> java.util.Collection<T> getAll()
public static <T extends WorkPart> java.util.Collection<T> find(SearchCriterion... criteria)
throws ModelException
criteria - Search criteria.
sort method.
ModelException -
public static <T extends WorkPart> java.util.Collection<T> find(java.util.Collection<SearchCriterion> criteria)
throws ModelException
criteria - Collection of search criteria.
sort method.
ModelException -
public static <T extends WorkPart> java.util.Collection<T> find(SearchCriteria criteria)
throws ModelException
criteria - Search criteria.
sort method.
ModelException -
public static void sort(WorkPart[] array,
WorkPart.SortOption... options)
array - Array of work parts.options - Sort options, or null to use the natural ordering.
public static WorkPart[] sort(java.util.Collection<WorkPart> collection,
WorkPart.SortOption... options)
collection - Collection of work parts.options - Sort options, or null to use the natural ordering.
public java.lang.String getTitle()
public java.lang.String getType()
public WorkPart getParent()
public int getNumChildren()
public java.util.List<WorkPart> getChildren()
public Work getWork()
public int getWorkOrdinal()
public int getLevel()
public boolean hasChildren()
This condition is the same as numChildren > 0.
public boolean hasText()
This condition is the same as getHtmlText() != null.
public boolean hasWords()
This condition is the same as numWordsNonCum > 0.
public SummaryCounts getSummaryCountsCum()
public SummaryCounts getSummaryCountsNonCum()
public SummaryCounts getSummaryCounts(CumKind cumKind)
getSummaryCounts in interface ContainercumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getSummaryCount(CumKind cumKind,
FeatureKind featureKind,
Arity arity,
MainKind mainKind)
getSummaryCount in interface ContainercumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM. (Ignored.)featureKind - Feature kind: FeatureKind.WORD or
FeatureKind.WORD_PART.arity - Arity: Arity.UNIGRAM, Arity.BIGRAM or Arity.TRIGRAM.mainKind - Main kind: MainKind.ALL_TEXT or MainKind.MAIN_TEXT.
public long getNumWords(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordsMain(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordBigrams(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordBigramsMain(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordTrigrams(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordTrigramsMain(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordParts(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordPartsMain(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordPartBigrams(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordPartBigramsMain(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordPartTrigrams(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumWordPartTrigramsMain(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumSentences(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public long getNumSentencesMain(CumKind cumKind)
cumKind - Kind of count: CumKind.CUM or CumKind.NON_CUM.
public java.lang.String getHtmlText()
throws ModelException
ModelException -
public java.lang.String getAdornedXml()
throws ModelException
ModelException -
public java.lang.String getUnadornedXml()
throws ModelException
ModelException - public java.util.Collection<WorkPart> getDescendants()
public WorkPart getNextWorkPartWithText()
public WorkPart getPrevWorkPartWithText()
public Word[] getWords()
throws ModelException
ModelException -
public WordPart[] getWordParts()
throws ModelException
ModelException - public int compareTo(WorkPart other)
Work parts are ordered fist in case and diacritical-insensitve alphabetical order by stripped corpus title, then in case and diacritical-insensitive alphabetical order by stripped work title, then by work part ordinal within works.
compareTo in interface java.lang.Comparable<WorkPart>other - The other instance to be compared.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||