edu.mit.jwi.data
Interface IDataType<T>

Type Parameters:
T - the type of the object returned by the parser for this data type
All Known Implementing Classes:
DataType

public interface IDataType<T>

Objects that implement this interface represent possible types of data that occur in the dictionary data directory.

In the standard Wordnet distributions, data types would include, but would not be limited to, Index files, Data files, and Exception files. The objects implementing this interface are then paired with an POS instance and ILineComparator instance to form an instance of an IContentType class, which identifies the specific data contained in the file. Note that here, 'data' refers not to an actual file, but to an instance of the IDataSource interface that provides access to the data, be it a file in the file system, a socket connection to a database, or something else.

Since:
JWI 2.0.0
Version:
2.4.0
Author:
Mark A. Finlayson

Method Summary
 ILineParser<T> getParser()
          Returns the line parser that can be used to process lines of data retrieved from an IDataSource file with this type.
 java.util.Set<java.lang.String> getResourceNameHints()
          Returns an immutable set of strings that can be used as keywords to identify resources that are of this type.
 boolean hasVersion()
          Indicates whether this content type usually has wordnet version information encoded in its header.
 

Method Detail

getParser

ILineParser<T> getParser()
Returns the line parser that can be used to process lines of data retrieved from an IDataSource file with this type.

Returns:
the line parser that can be used to process lines of data retrieved from an IDataSource file with this type.
Since:
JWI 2.0.0

hasVersion

boolean hasVersion()
Indicates whether this content type usually has wordnet version information encoded in its header.

Returns:
true if the content file that underlies this content usually has wordnet version information in its comment header; false otherwise.
Since:
JWI 2.1.0

getResourceNameHints

java.util.Set<java.lang.String> getResourceNameHints()
Returns an immutable set of strings that can be used as keywords to identify resources that are of this type.

Returns:
a set of resource name fragments
Since:
JWI 2.0.0


Copyright © 2007-2013 Massachusetts Institute of Technology. All Rights Reserved.