public class

DocumentSource

extends ExtensionPoint
java.lang.Object
   ↳ com.google.gdata.data.AbstractExtension
     ↳ com.google.gdata.data.ExtensionPoint
       ↳ com.google.gdata.data.gtt.DocumentSource

Class Overview

Describes a document source.

Summary

Nested Classes
enum DocumentSource.Type Type. 
Constants
String TYPE XML "type" attribute name
String URL XML "url" attribute name
String XML_NAME XML element name
Fields
private static final EnumToAttributeValue<DocumentSource.Type> TYPE_ENUM_TO_ATTRIBUTE_VALUE
private DocumentSource.Type type Type
private String url Url
[Expand]
Inherited Fields
From class com.google.gdata.data.ExtensionPoint
From class com.google.gdata.data.AbstractExtension
Public Constructors
DocumentSource()
Default mutable constructor.
DocumentSource(DocumentSource.Type type, String url)
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.
DocumentSource.Type getType()
Returns the type.
String getUrl()
Returns the url.
boolean hasType()
Returns whether it has the type.
boolean hasUrl()
Returns whether it has the url.
int hashCode()
void setType(DocumentSource.Type type)
Sets the type.
void setUrl(String url)
Sets the url.
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 TYPE

XML "type" attribute name

Constant Value: "type"

private static final String URL

XML "url" attribute name

Constant Value: "url"

static final String XML_NAME

XML element name

Constant Value: "documentSource"

Fields

private static final EnumToAttributeValue<DocumentSource.Type> TYPE_ENUM_TO_ATTRIBUTE_VALUE

private DocumentSource.Type type

Type

private String url

Url

Public Constructors

public DocumentSource ()

Default mutable constructor.

public DocumentSource (DocumentSource.Type type, String url)

Immutable constructor.

Parameters
type Type.
url Url.

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 DocumentSource.Type getType ()

Returns the type.

Returns
  • type

public String getUrl ()

Returns the url.

Returns
  • url

public boolean hasType ()

Returns whether it has the type.

Returns
  • whether it has the type

public boolean hasUrl ()

Returns whether it has the url.

Returns
  • whether it has the url

public int hashCode ()

public void setType (DocumentSource.Type type)

Sets the type.

Parameters
type Type or null to reset

public void setUrl (String url)

Sets the url.

Parameters
url Url 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.