it.unimi.di.mg4j.document
Enum PropertyBasedDocumentFactory.MetadataKeys

java.lang.Object
  extended by java.lang.Enum<PropertyBasedDocumentFactory.MetadataKeys>
      extended by it.unimi.di.mg4j.document.PropertyBasedDocumentFactory.MetadataKeys
All Implemented Interfaces:
Serializable, Comparable<PropertyBasedDocumentFactory.MetadataKeys>
Enclosing class:
PropertyBasedDocumentFactory

public static enum PropertyBasedDocumentFactory.MetadataKeys
extends Enum<PropertyBasedDocumentFactory.MetadataKeys>

Case-insensitive keys for metadata passed to DocumentFactory.getDocument(java.io.InputStream,it.unimi.dsi.fastutil.objects.Reference2ObjectMap).

The keys in this class are general-purpose keys that are meaningful for most factories. Specific factory implementations might choose to interpret more keys, but then it is up to the DocumentSequence that uses the factory to provide data for those keys.

Note that the metadata map is a reference map. We cannot use an EnumMap because we do not know in advance the enum(s) whose items will be put in the map.


Enum Constant Summary
ENCODING
          The tag for charset encoding metadata (a string normalised through Charset.forName(java.lang.String)).
LOCALE
          The tag for locale metadata (a Locale).
MIMETYPE
          The tag for MIME type metadata (a string).
TITLE
          The tag for a document title (a character sequence).
URI
          The tag for a document uri (a character sequence).
WORDREADER
          The tag for the optional name of a word reader class.
 
Method Summary
static PropertyBasedDocumentFactory.MetadataKeys valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PropertyBasedDocumentFactory.MetadataKeys[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TITLE

public static final PropertyBasedDocumentFactory.MetadataKeys TITLE
The tag for a document title (a character sequence).


URI

public static final PropertyBasedDocumentFactory.MetadataKeys URI
The tag for a document uri (a character sequence).


MIMETYPE

public static final PropertyBasedDocumentFactory.MetadataKeys MIMETYPE
The tag for MIME type metadata (a string).


ENCODING

public static final PropertyBasedDocumentFactory.MetadataKeys ENCODING
The tag for charset encoding metadata (a string normalised through Charset.forName(java.lang.String)).


WORDREADER

public static final PropertyBasedDocumentFactory.MetadataKeys WORDREADER
The tag for the optional name of a word reader class.


LOCALE

public static final PropertyBasedDocumentFactory.MetadataKeys LOCALE
The tag for locale metadata (a Locale).

Method Detail

values

public static PropertyBasedDocumentFactory.MetadataKeys[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PropertyBasedDocumentFactory.MetadataKeys c : PropertyBasedDocumentFactory.MetadataKeys.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PropertyBasedDocumentFactory.MetadataKeys valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null