public class

ImportFormat

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.docs.ImportFormat

Class Overview

A map of possible import formats.

Summary

Nested Classes
enum ImportFormat.Target Import target document type. 
Constants
String SOURCE XML "source" attribute name
String TARGET XML "target" attribute name
String XML_NAME XML element name
Fields
private static final EnumToAttributeValue<ImportFormat.Target> TARGET_ENUM_TO_ATTRIBUTE_VALUE
private String source Import source mime type
private ImportFormat.Target target Import target document type
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
ImportFormat()
Default mutable constructor.
ImportFormat(String source, ImportFormat.Target target)
Immutable constructor.
Public Methods
boolean equals(Object obj)
static ExtensionDescription getDefaultDescription(boolean required, boolean repeatable)
Returns the extension description, specifying whether it is required, and whether it is repeatable.
String getSource()
Returns the import source mime type.
ImportFormat.Target getTarget()
Returns the import target document type.
boolean hasSource()
Returns whether it has the import source mime type.
boolean hasTarget()
Returns whether it has the import target document type.
int hashCode()
void setSource(String source)
Sets the import source mime type.
void setTarget(ImportFormat.Target target)
Sets the import target document type.
String toString()
Protected Methods
void consumeAttributes(AttributeHelper helper)
Consumes attributes from the attribute helper.
void putAttributes(AttributeGenerator generator)
Puts attributes into the attribute generator.
void validate()
Checks the attributes to see if there are any problems.
[Expand]
Inherited Methods
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
From class java.lang.Object
From interface com.google.gdata.data.Extension

Constants

private static final String SOURCE

XML "source" attribute name

Constant Value: "source"

private static final String TARGET

XML "target" attribute name

Constant Value: "target"

static final String XML_NAME

XML element name

Constant Value: "importFormat"

Fields

private static final EnumToAttributeValue<ImportFormat.Target> TARGET_ENUM_TO_ATTRIBUTE_VALUE

private String source

Import source mime type

private ImportFormat.Target target

Import target document type

Public Constructors

public ImportFormat ()

Default mutable constructor.

public ImportFormat (String source, ImportFormat.Target target)

Immutable constructor.

Parameters
source Import source mime type.
target Import target document type.

Public Methods

public boolean equals (Object obj)

Parameters
obj

public static ExtensionDescription getDefaultDescription (boolean required, boolean repeatable)

Returns the extension description, specifying whether it is required, and whether it is repeatable.

Parameters
required Whether it is required
repeatable Whether it is repeatable
Returns
  • extension description

public String getSource ()

Returns the import source mime type.

Returns
  • import source mime type

public ImportFormat.Target getTarget ()

Returns the import target document type.

Returns
  • import target document type

public boolean hasSource ()

Returns whether it has the import source mime type.

Returns
  • whether it has the import source mime type

public boolean hasTarget ()

Returns whether it has the import target document type.

Returns
  • whether it has the import target document type

public int hashCode ()

public void setSource (String source)

Sets the import source mime type.

Parameters
source Import source mime type or null to reset

public void setTarget (ImportFormat.Target target)

Sets the import target document type.

Parameters
target Import target document type or null to reset

public String toString ()

Protected Methods

protected void consumeAttributes (AttributeHelper helper)

Consumes attributes from the attribute helper. May also use consumeContent(boolean) to consume the element's text content. Called from getHandler(ExtensionProfile, String, String, Attributes). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
helper Attribute helper

protected void putAttributes (AttributeGenerator generator)

Puts attributes into the attribute generator. Called from generate(XmlWriter, ExtensionProfile). Default implementation does nothing, though generally this is discouraged unless there really are no attributes.

Parameters
generator Attribute generator

protected void validate ()

Checks the attributes to see if there are any problems. Default implementation does nothing, though generally this is discouraged unless there really are no restrictions.