# NewsAttributes (Crawler-commons 1.1 API)
Date: 2020-06-25

crawlercommons.sitemaps.extension

## Class NewsAttributes

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

All Implemented Interfaces:
  Serializable

    public class NewsAttributes
    extends ExtensionMetadata

Data model for Google's extension to the sitemap protocol regarding news indexing, as per http://www.google.com/schemas/sitemap-news/0.9.

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`static class` `NewsAttributes.NewsGenre`

### Field Summary

Fields
`static String` `GENRES`
`static String` `KEYWORDS`
`static String` `LANGUAGE`
`static String` `NAME`
`static String` `PUBLICATION_DATE`
`static String` `STOCK_TICKERS`
`static String` `TITLE`

### Constructor Summary

Constructors
Constructor and Description
`NewsAttributes()`
`NewsAttributes(String name, String language, java.time.ZonedDateTime publicationDate, String title)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Map<String,String[]>` `asMap()`
`boolean` `equals(Object other)`
`NewsAttributes.NewsGenre[]` `getGenres()`
`String[]` `getKeywords()`
`String` `getLanguage()`
`String` `getName()`
`Date` `getPublicationDate()`
`java.time.ZonedDateTime` `getPublicationDateTime()`
`String[]` `getStockTickers()`
`String` `getTitle()`
`boolean` `isValid()`
`void` `setGenres(NewsAttributes.NewsGenre[] genres)`
`void` `setKeywords(String[] keywords)`
`void` `setLanguage(String language)`
`void` `setName(String name)`
`void` `setPublicationDate(java.time.ZonedDateTime publicationDate)`
`void` `setStockTickers(String[] stockTickers)`
`void` `setTitle(String title)`
`String` `toString()`

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

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

### Field Detail

#### NAME

    public static final String NAME

See Also:
  Constant Field Values

#### LANGUAGE

    public static final String LANGUAGE

See Also:
  Constant Field Values

#### GENRES

    public static final String GENRES

See Also:
  Constant Field Values

#### PUBLICATION_DATE

    public static final String PUBLICATION_DATE

See Also:
  Constant Field Values

#### TITLE

    public static final String TITLE

See Also:
  Constant Field Values

#### KEYWORDS

    public static final String KEYWORDS

See Also:
  Constant Field Values

#### STOCK_TICKERS

    public static final String STOCK_TICKERS

See Also:
  Constant Field Values

### Constructor Detail

#### NewsAttributes

    public NewsAttributes()

#### NewsAttributes

    public NewsAttributes(String name,
                          String language,
                          java.time.ZonedDateTime publicationDate,
                          String title)

### Method Detail

#### getName

    public String getName()

#### setName

    public void setName(String name)

#### getLanguage

    public String getLanguage()

#### setLanguage

    public void setLanguage(String language)

#### getGenres

    public NewsAttributes.NewsGenre[] getGenres()

#### setGenres

    public void setGenres(NewsAttributes.NewsGenre[] genres)

#### getPublicationDate

    public Date getPublicationDate()

#### getPublicationDateTime

    public java.time.ZonedDateTime getPublicationDateTime()

#### setPublicationDate

    public void setPublicationDate(java.time.ZonedDateTime publicationDate)

#### getTitle

    public String getTitle()

#### setTitle

    public void setTitle(String title)

#### getKeywords

    public String[] getKeywords()

#### setKeywords

    public void setKeywords(String[] keywords)

#### getStockTickers

    public String[] getStockTickers()

#### setStockTickers

    public void setStockTickers(String[] stockTickers)

#### equals

    public boolean equals(Object other)

Specified by:
  `equals` in class `ExtensionMetadata`

#### isValid

    public boolean isValid()

Overrides:
  `isValid` in class `ExtensionMetadata`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### asMap

    public Map<String,String[]> asMap()

Specified by:
  `asMap` in class `ExtensionMetadata`