# LinkAttributes (Crawler-commons 1.0 API)
Date: 2019-03-19

crawlercommons.sitemaps.extension

## Class LinkAttributes

- java.lang.Object
- - crawlercommons.sitemaps.extension.ExtensionMetadata
  - - crawlercommons.sitemaps.extension.LinkAttributes

    public class LinkAttributes
    extends ExtensionMetadata

Data model for Google extension to the sitemap protocol regarding alternate links indexing. Cf. https://support.google.com/webmasters/answer/189077:

> Each `<url>` element must have a child element: `<xhtml:link rel="alternate" hreflang="supported_language-code">` that lists every alternate version of the page, including itself. The order of these child `<xhtml:link>` elements doesn't matter, though you might want to keep them in the same order to make them easier for you to check for mistakes.

### Constructor Summary

Constructors
Constructor and Description
`LinkAttributes()`
`LinkAttributes(URL href)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(Object other)`
`URL` `getHref()`
`Map<String,String>` `getParams()`
`void` `setHref(URL href)`
`void` `setParams(Map<String,String> params)`
`String` `toString()`

### Methods inherited from class crawlercommons.sitemaps.extension.ExtensionMetadata

`isValid`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### LinkAttributes

    public LinkAttributes()

#### LinkAttributes

    public LinkAttributes(URL href)

### Method Detail

#### getHref

    public URL getHref()

#### setHref

    public void setHref(URL href)

#### getParams

    public Map<String,String> getParams()

#### setParams

    public void setParams(Map<String,String> params)

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### equals

    public boolean equals(Object other)

Specified by:
  `equals` in class `ExtensionMetadata`