com.linkedin.restli.common
Class Link

java.lang.Object
  extended by com.linkedin.data.template.RecordTemplate
      extended by com.linkedin.restli.common.Link
All Implemented Interfaces:
com.linkedin.data.template.DataTemplate<com.linkedin.data.DataMap>, java.lang.Cloneable

public class Link
extends com.linkedin.data.template.RecordTemplate

A atom:link-inspired link


Constructor Summary
Link()
          Initialize a new link with no data.
Link(com.linkedin.data.DataMap data)
          Initialize a new link with the given underlying data.
 
Method Summary
 java.lang.String getHref()
          Get href attribute of the Link.
 java.lang.String getHref(com.linkedin.data.template.GetMode mode)
          Returns the href attribute of the Link.
 java.lang.String getRel()
          Get rel attribute of the Link.
 java.lang.String getRel(com.linkedin.data.template.GetMode mode)
          Returns the rel attribute of the Link.
 java.lang.String getTitle()
          Get title attribute of the Link.
 java.lang.String getTitle(com.linkedin.data.template.GetMode mode)
          Returns title href attribute of the Link.
 java.lang.String getType()
          Get type attribute of the Link.
 java.lang.String getType(com.linkedin.data.template.GetMode mode)
          Returns the type attribute of the Link.
 boolean hasHref()
           
 boolean hasRel()
           
 boolean hasTitle()
           
 boolean hasType()
           
 void removeHref()
          Remove the href attribute from this Link.
 void removeRel()
          Remove the rel attribute from this Link.
 void removeTitle()
          Remove the title attribute from this Link.
 void removeType()
          Remove the type attribute from this Link.
 void setHref(java.lang.String value)
          Set the rel attribute.
 void setRel(java.lang.String value)
          Set the rel attribute.
 void setTitle(java.lang.String value)
          Set the title attribute.
 void setType(java.lang.String value)
          Set the type attribute.
 
Methods inherited from class com.linkedin.data.template.RecordTemplate
clone, contains, copy, data, equals, hashCode, obtainDirect, obtainWrapped, putDirect, putDirect, putDirect, putWrapped, putWrapped, remove, schema, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Link

public Link()
Initialize a new link with no data.


Link

public Link(com.linkedin.data.DataMap data)
Initialize a new link with the given underlying data.

Parameters:
data - a DataMap representing the data in a Link
Method Detail

hasRel

public boolean hasRel()
Returns:
true if the Link has a rel attribute, and false otherwise

removeRel

public void removeRel()
Remove the rel attribute from this Link.


getRel

public java.lang.String getRel(com.linkedin.data.template.GetMode mode)
Returns the rel attribute of the Link. If the attribute is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
a String

getRel

public java.lang.String getRel()
Get rel attribute of the Link. If the attribute is not found, act in accordance with GetMode.STRICT.

Returns:
a String

setRel

public void setRel(java.lang.String value)
Set the rel attribute.

Parameters:
value - rel attribute value

hasHref

public boolean hasHref()
Returns:
true if the Link has a href attribute, and false otherwise

removeHref

public void removeHref()
Remove the href attribute from this Link.


getHref

public java.lang.String getHref(com.linkedin.data.template.GetMode mode)
Returns the href attribute of the Link. If the attribute is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
a String

getHref

public java.lang.String getHref()
Get href attribute of the Link. If the attribute is not found, act in accordance with GetMode.STRICT.

Returns:
a String

setHref

public void setHref(java.lang.String value)
Set the rel attribute.

Parameters:
value - rel attribute value

hasType

public boolean hasType()
Returns:
true if the Link has a type attribute, and false otherwise

removeType

public void removeType()
Remove the type attribute from this Link.


getType

public java.lang.String getType(com.linkedin.data.template.GetMode mode)
Returns the type attribute of the Link. If the attribute is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
a String

getType

public java.lang.String getType()
Get type attribute of the Link. If the attribute is not found, act in accordance with GetMode.STRICT.

Returns:
a String

setType

public void setType(java.lang.String value)
Set the type attribute.

Parameters:
value - rel attribute value

hasTitle

public boolean hasTitle()
Returns:
true if the Link has a title attribute, and false otherwise

removeTitle

public void removeTitle()
Remove the title attribute from this Link.


getTitle

public java.lang.String getTitle(com.linkedin.data.template.GetMode mode)
Returns title href attribute of the Link. If the attribute is not present, behavior will be determined by the given mode.

Parameters:
mode - determines behavior if the attribute is not present
Returns:
a String

getTitle

public java.lang.String getTitle()
Get title attribute of the Link. If the attribute is not found, act in accordance with GetMode.STRICT.

Returns:
a String

setTitle

public void setTitle(java.lang.String value)
Set the title attribute.

Parameters:
value - rel attribute value