|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.gbase.client.GoogleBaseAttribute
public class GoogleBaseAttribute
An internal representation for a tag in the g: namespace.
Constructor Summary | |
---|---|
GoogleBaseAttribute(GoogleBaseAttributeId attributeId,
java.lang.String textValue)
Creates a new Extension attribute with an GoogleBaseAttributeId and
string content. |
|
GoogleBaseAttribute(java.lang.String name)
Creates a new GoogleBaseAttribute with a name and no type. |
|
GoogleBaseAttribute(java.lang.String name,
GoogleBaseAttributeType type)
Creates a new GoogleBaseAttribute with a name and type. |
|
GoogleBaseAttribute(java.lang.String name,
GoogleBaseAttributeType type,
boolean privateAccess)
Creates a new GoogleBaseAttribute with a name and type. |
|
GoogleBaseAttribute(java.lang.String name,
GoogleBaseAttributeType type,
boolean privateAccess,
java.lang.String textValue)
Creates a new Extension attribute with a name, type and string content. |
|
GoogleBaseAttribute(java.lang.String name,
GoogleBaseAttributeType type,
java.lang.String textValue)
Creates a new Extension attribute with a name, type and string content. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
|
Adjustments |
getAdjustments()
Gets the adjustments for this attribute. |
GoogleBaseAttributeId |
getAttributeId()
Returns the attribute identity, name and type. |
java.lang.String |
getName()
Gets the attribute name. |
java.util.Collection<? extends java.lang.String> |
getSubElementNames()
Gets the name of all sub-elements in this attribute. |
java.lang.String |
getSubElementValue(java.lang.String name)
Gets the value of a sub-tag. |
java.util.List<Thumbnail> |
getThumbnails()
Gets the reference to the list of thumbnails for this attribute. |
GoogleBaseAttributeType |
getType()
Gets the type of the attribute, or null. |
java.lang.String |
getValueAsString()
Gets the attribute value, as a string (or null). |
boolean |
hasAdjustments()
|
int |
hashCode()
|
boolean |
hasSubElement(java.lang.String name)
Checks whether a specific sub-element exists. |
boolean |
hasSubElements()
Returns true if the attribute has sub-tags. |
boolean |
hasThumbnails()
Returns true if the attribute has thumbnails, false otherwise. |
boolean |
hasValue()
Returns true if the attribute has some text content. |
boolean |
isPrivate()
Checks whether the attribute should only be shown to the owner of this item. |
void |
removeSubElement(java.lang.String name)
Removes a sub-element. |
void |
setPrivate(boolean privateAccess)
Declares the attribute as being private or public (the default). |
void |
setSubElement(java.lang.String name,
java.lang.String value)
Sets the value of a sub-tag. |
void |
setValue(java.lang.String value)
Sets the attribute value, as a string. |
java.lang.String |
toString()
Generates a string representation of this attribute. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public GoogleBaseAttribute(java.lang.String name)
name
- public GoogleBaseAttribute(java.lang.String name, GoogleBaseAttributeType type)
name
- type
- attribute type, one of the TYPE_* defined in this class,
or nullpublic GoogleBaseAttribute(java.lang.String name, GoogleBaseAttributeType type, java.lang.String textValue)
name
- type
- type attribute type, one of the types defined in
GoogleBaseAttributeType
, some new type or nulltextValue
- content of the attribute, as a string
java.lang.NullPointerException
- if argument name is nullpublic GoogleBaseAttribute(java.lang.String name, GoogleBaseAttributeType type, boolean privateAccess)
name
- type
- attribute type, one of the TYPE_* defined in this class,
or nullprivateAccess
- if this attributeId is privatepublic GoogleBaseAttribute(java.lang.String name, GoogleBaseAttributeType type, boolean privateAccess, java.lang.String textValue)
name
- type
- type attribute type, one of the types defined in
GoogleBaseAttributeType
, some new type or nullprivateAccess
- if this attribute is privatetextValue
- content of the attribute, as a string
java.lang.NullPointerException
- if argument name is nullpublic GoogleBaseAttribute(GoogleBaseAttributeId attributeId, java.lang.String textValue)
GoogleBaseAttributeId
and
string content.
attributeId
- attribute name and typetextValue
- content of the attribute, as a string
java.lang.NullPointerException
- if argument name is nullMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public GoogleBaseAttributeType getType()
public GoogleBaseAttributeId getAttributeId()
public java.lang.String getValueAsString()
public boolean isPrivate()
public void setPrivate(boolean privateAccess)
privateAccess
- public void setValue(java.lang.String value)
value
- attribute valuepublic boolean hasValue()
public boolean hasSubElements()
public void setSubElement(java.lang.String name, java.lang.String value)
name
- tag namevalue
- tag content, as a string or null to remove
the sub-elementpublic java.lang.String getSubElementValue(java.lang.String name)
name
-
public boolean hasSubElement(java.lang.String name)
name
- element name
public void removeSubElement(java.lang.String name)
name
- element namespublic java.util.Collection<? extends java.lang.String> getSubElementNames()
public boolean hasAdjustments()
public Adjustments getAdjustments()
Adjustments
object is created, linked to this attribute
and returned.
public boolean hasThumbnails()
public java.util.List<Thumbnail> getThumbnails()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |