T - the type of object for the content typepublic class ContentType<T> extends Object implements IContentType<T>
IContentType interface. This class
provides the content types necessary for Wordnet in the form of static
fields. It is not implemented as an Enum so that clients may add
their own content types by instantiating this class.| Modifier and Type | Field and Description |
|---|---|
static ContentType<ISynset> |
DATA_ADJECTIVE |
static ContentType<ISynset> |
DATA_ADVERB |
static ContentType<ISynset> |
DATA_NOUN |
static ContentType<ISynset> |
DATA_VERB |
static ContentType<IExceptionEntryProxy> |
EXCEPTION_ADJECTIVE |
static ContentType<IExceptionEntryProxy> |
EXCEPTION_ADVERB |
static ContentType<IExceptionEntryProxy> |
EXCEPTION_NOUN |
static ContentType<IExceptionEntryProxy> |
EXCEPTION_VERB |
static ContentType<IIndexWord> |
INDEX_ADJECTIVE |
static ContentType<IIndexWord> |
INDEX_ADVERB |
static ContentType<IIndexWord> |
INDEX_NOUN |
static ContentType<IIndexWord> |
INDEX_VERB |
static ContentType<ISenseEntry> |
SENSE |
| Constructor and Description |
|---|
ContentType(IDataType<T> type,
POS pos,
ILineComparator comparator)
Constructs a new ContentType
|
ContentType(IDataType<T> type,
POS pos,
ILineComparator comparator,
Charset charset)
Constructs a new ContentType
|
| Modifier and Type | Method and Description |
|---|---|
Charset |
getCharset()
Returns the character set associated with this object.
|
static IContentType<ISynset> |
getDataContentType(POS pos)
Use this convenience method to retrieve the appropriate
ISynset content type for the specified POS. |
IDataType<T> |
getDataType()
Returns the assigned resource type of this object.
|
static IContentType<IExceptionEntryProxy> |
getExceptionContentType(POS pos)
Use this convenience method to retrieve the appropriate
IExceptionEntryProxy content type for the specified POS. |
static IContentType<IIndexWord> |
getIndexContentType(POS pos)
Use this convenience method to retrieve the appropriate
IIndexWord content type for the specified POS. |
ILineComparator |
getLineComparator()
Returns a comparator that can be used to determine ordering between
different lines of data in the resource.
|
POS |
getPOS()
Returns the associated part of speech for this object.
|
String |
toString() |
static Collection<ContentType<?>> |
values()
Emulates the Enum.values() function.
|
public static final ContentType<IIndexWord> INDEX_NOUN
public static final ContentType<IIndexWord> INDEX_VERB
public static final ContentType<IIndexWord> INDEX_ADVERB
public static final ContentType<IIndexWord> INDEX_ADJECTIVE
public static final ContentType<ISynset> DATA_NOUN
public static final ContentType<ISynset> DATA_VERB
public static final ContentType<ISynset> DATA_ADVERB
public static final ContentType<ISynset> DATA_ADJECTIVE
public static final ContentType<IExceptionEntryProxy> EXCEPTION_NOUN
public static final ContentType<IExceptionEntryProxy> EXCEPTION_VERB
public static final ContentType<IExceptionEntryProxy> EXCEPTION_ADVERB
public static final ContentType<IExceptionEntryProxy> EXCEPTION_ADJECTIVE
public static final ContentType<ISenseEntry> SENSE
public ContentType(IDataType<T> type, POS pos, ILineComparator comparator)
type - the data type for this content type, may not be
nullpos - the part of speech for this content type; may be null if the
content type has no natural part of speechcomparator - the line comparator for this content type; may be
null if the lines are not orderedpublic ContentType(IDataType<T> type, POS pos, ILineComparator comparator, Charset charset)
type - the data type for this content type, may not be
nullpos - the part of speech for this content type; may be null if the
content type has no natural part of speechcomparator - the line comparator for this content type; may be
null if the lines are not orderedcharset - the character set for this content type, may be
nullpublic IDataType<T> getDataType()
IContentTypenullgetDataType in interface IContentType<T>public POS getPOS()
IHasPOSnull.public ILineComparator getLineComparator()
IContentTypenull.getLineComparator in interface IContentType<T>null if there is no comparatorpublic Charset getCharset()
IHasCharsetnull.getCharset in interface IHasCharsetnullpublic static Collection<ContentType<?>> values()
public static IContentType<IIndexWord> getIndexContentType(POS pos)
IIndexWord content type for the specified POS.pos - the part of speech for the content type, may not be
nullNullPointerException - if the specified part of speech is nullpublic static IContentType<ISynset> getDataContentType(POS pos)
ISynset content type for the specified POS.pos - the part of speech for the content type, may not be
nullNullPointerException - if the specified part of speech is nullpublic static IContentType<IExceptionEntryProxy> getExceptionContentType(POS pos)
IExceptionEntryProxy content type for the specified POS.pos - the part of speech for the content type, may not be
nullNullPointerException - if the specified part of speech is nullCopyright © 2018. All rights reserved.