|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.mit.jwi.data.ContentType<T>
T
- the type of object for the content typepublic class ContentType<T>
A concrete implementation of the 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.
Field Summary | |
---|---|
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 Summary | |
---|---|
ContentType(IDataType<T> type,
POS pos,
ILineComparator comparator)
Constructs a new ContentType |
|
ContentType(IDataType<T> type,
POS pos,
ILineComparator comparator,
java.nio.charset.Charset charset)
Constructs a new ContentType |
Method Summary | |
---|---|
java.nio.charset.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. |
java.lang.String |
toString()
|
static java.util.Collection<ContentType<?>> |
values()
Emulates the Enum.values() function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
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
Constructor Detail |
---|
public ContentType(IDataType<T> type, POS pos, ILineComparator comparator)
type
- the data type for this content type, may not be
null
pos
- 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, java.nio.charset.Charset charset)
type
- the data type for this content type, may not be
null
pos
- 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
null
Method Detail |
---|
public IDataType<T> getDataType()
IContentType
null
getDataType
in interface IContentType<T>
public POS getPOS()
IHasPOS
null
.
getPOS
in interface IHasPOS
null
if none.public ILineComparator getLineComparator()
IContentType
null
.
getLineComparator
in interface IContentType<T>
null
if there is no comparatorpublic java.nio.charset.Charset getCharset()
IHasCharset
null
.
getCharset
in interface IHasCharset
null
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.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
null
java.lang.NullPointerException
- if the specified part of speech is null
public 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
null
java.lang.NullPointerException
- if the specified part of speech is null
public 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
null
java.lang.NullPointerException
- if the specified part of speech is null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |