org.eclipse.actf.visualization.eval.html.statistics

## Class PageData

- java.lang.Object
- - org.eclipse.actf.visualization.eval.html.statistics.PageData

All Implemented Interfaces:
  IPageStatisticsTag, IProblemItemVisitor

    public class PageData
    extends Object
    implements IPageStatisticsTag, IProblemItemVisitor

Utility class to store HTML page information including statistics

### Field Summary

### Fields inherited from interface org.eclipse.actf.visualization.eval.html.statistics.IPageStatisticsTag

`ALIGN, ALT, BASE, BGCOLOR, DEST, ERROR, EXISTENCE, FLASH, FLASH_INFO, HEADING, HEADINGS, HEIGHT, HREF, ID, IMAGE, IMAGES, ITEM, JAVASCRIPT, MAX, MEAN, MIN, MISSING, NAME, ORG_MAX, ORG_MEAN, ORG_MIN, REACHINGTIME, SKIPMAIN, SRC, TARGET_STRING, TOTAL, URL, VALID, VALUE, WIDTH, WRONG, XPATH`

### Constructor Summary

Constructors
Constructor and Description
`PageData()`

### Method Summary

Methods
`void` `addFlashData(FlashData flashData)` Add flash content information
`int` `getBrokenIntraPageLinkNum()`
`int` `getBrokenSkipMainNum()`
`Vector<FlashData>` `getFlashData()`
`int` `getForwardIntraPageLinkNum()`
`int` `getHeadingCount()`
`Vector<HeadingsData>` `getHeadingsData()`
`int` `getImageAltErrorNum()`
`Vector<ImageStatData>` `getImageData()`
`Map<org.w3c.dom.html.HTMLImageElement,ImageStatData>` `getImageDataMap()`
`double` `getInvalidLinkRatio()`
`Map<Element,ImageStatData>` `getLinkImageDataMap()`
`int` `getMaxTime()`
`int` `getMissingAltNum()`
`int` `getOrgMaxTime()`
`String` `getReportFragment()` Get page data information as XML fragment
`int` `getSkipMainNum()`
`int` `getTotalImageNumber()`
`int` `getTotalLinkNum()`
`int` `getWrongAltNum()`
`boolean` `hasFrame()`
`boolean` `hasJavascript()`
`boolean` `isError()` Set if page is error page
`void` `setBrokenIntraPageLinkNum(int brokenIntraPageLinkNum)` Set broken intra page link number
`void` `setBrokenSkipMainNum(int brokenSkipMainNum)` Set broken skip to main content link number
`void` `setError(boolean isError)`
`void` `setFlashData(Vector<FlashData> flashV)` Set flash information of the page
`void` `setForwardIntraPageLinkNum(int forwardIntraPageLinkNum)` Set number of forward intra page link
`void` `setHasFrame(boolean hasFrame)` Set if page has child frame or not
`void` `setHasJavascript(boolean hasJavascript)` Set if page uses JavaScript
`void` `setHeadingsData(Vector<HeadingsData> headings)` Set headings information of the page
`void` `setImageAltErrorNum(int imageAltErrorNum)` Set error number of alternative text for image
`void` `setImageData(Vector<ImageStatData> imageDataV)` Set image information data
`void` `setImageDataMap(Map<org.w3c.dom.html.HTMLImageElement,ImageStatData> imageDataMap)` Set map contains `HTMLImageElement` and it's information pair
`void` `setInvalidLinkRatio(double invalidLinkRatio)` Set invalid link ratio of the page.
`void` `setLinkImageDataMap(Map<Element,ImageStatData> linkImageDataMap)` Set map contains ancestor anchor `Element` of image link and image information pair
`void` `setMaxTime(int maxTime)` Set maximum reaching time of the page
`void` `setMissingAltNum(int missingAltNum)` Set number of missing alt attribute for image
`void` `setOrgMaxTime(int orgMaxTime)` Set original reaching time (without consideration of headings, skip links, etc.)
`void` `setSkipMainNum(int skipMainNum)` Set valid skip to main content link number
`void` `setTotalImageNumber(int totalImageNumber)` Set total number of image in the page
`void` `setTotalLinkNum(int totalLinkNum)` Set total number of link (anchor element with href attribute) in the page
`void` `setWrongAltNum(int wrongAltNum)` Set number of inappropriate alternative text in the page
`void` `visit(IProblemItem item)` Visit `IProblemItem` and do something.

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

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PageData

    public PageData()

### Method Detail

#### addFlashData

    public void addFlashData(FlashData flashData)

Add flash content information

Parameters:
  `flashData` - target `FlashData`

#### getBrokenIntraPageLinkNum

    public int getBrokenIntraPageLinkNum()

Returns:
  number of broken intra page links

#### getBrokenSkipMainNum

    public int getBrokenSkipMainNum()

Returns:
  number of broken skip to main content links

#### getFlashData

    public Vector<FlashData> getFlashData()

Returns:
  flash content information

#### getForwardIntraPageLinkNum

    public int getForwardIntraPageLinkNum()

Returns:
  number of forward intra page link

#### getHeadingCount

    public int getHeadingCount()

Returns:
  number of headings in the page

#### getHeadingsData

    public Vector<HeadingsData> getHeadingsData()

Returns:
  headings information

#### getImageAltErrorNum

    public int getImageAltErrorNum()

Returns:
  number of errors of alternative text for image

#### getInvalidLinkRatio

    public double getInvalidLinkRatio()

Returns:
  invalid link ratio of the page. (target URL number under invisible link/all target URL number)

#### getMaxTime

    public int getMaxTime()

Returns:
  maximum reaching time inside the page

#### getMissingAltNum

    public int getMissingAltNum()

Returns:
  number of missing alternative text for image

#### getReportFragment

    public String getReportFragment()

Get page data information as XML fragment

Returns:
  page data information as XML fragment

#### getSkipMainNum

    public int getSkipMainNum()

Returns:
  number of valid skip to main content link

#### getTotalImageNumber

    public int getTotalImageNumber()

Returns:
  total number of images

#### getTotalLinkNum

    public int getTotalLinkNum()

Returns:
  total number of link (anchor with href attribute)

#### getImageData

    public Vector<ImageStatData> getImageData()

Returns:
  image information data

#### setImageData

    public void setImageData(Vector<ImageStatData> imageDataV)

Set image information data

Parameters:
  `imageDataV` - Vector of target `ImageStatData`

#### getWrongAltNum

    public int getWrongAltNum()

Returns:
  number of inappropriate alt attribute

#### getOrgMaxTime

    public int getOrgMaxTime()

Returns:
  original reaching time (without consideration of headings, skip links, etc.)

#### getImageDataMap

    public Map<org.w3c.dom.html.HTMLImageElement,ImageStatData> getImageDataMap()

Returns:
  map contains `HTMLImageElement` and it's information pair

#### getLinkImageDataMap

    public Map<Element,ImageStatData> getLinkImageDataMap()

Returns:
  map contains ancestor anchor `Element` of image link and image information pair

#### hasJavascript

    public boolean hasJavascript()

Returns:
  true if page uses JavaScript

#### setHasJavascript

    public void setHasJavascript(boolean hasJavascript)

Set if page uses JavaScript

Parameters:
  `hasJavascript` - true if page uses JavaScript

#### setLinkImageDataMap

    public void setLinkImageDataMap(Map<Element,ImageStatData> linkImageDataMap)

Set map contains ancestor anchor `Element` of image link and image information pair

Parameters:
  `linkImageDataMap` - target map

#### setImageDataMap

    public void setImageDataMap(Map<org.w3c.dom.html.HTMLImageElement,ImageStatData> imageDataMap)

Set map contains `HTMLImageElement` and it's information pair

Parameters:
  `imageDataMap` - target map

#### setOrgMaxTime

    public void setOrgMaxTime(int orgMaxTime)

Set original reaching time (without consideration of headings, skip links, etc.)

Parameters:
  `orgMaxTime` - original reaching time of the page

#### setBrokenIntraPageLinkNum

    public void setBrokenIntraPageLinkNum(int brokenIntraPageLinkNum)

Set broken intra page link number

Parameters:
  `brokenIntraPageLinkNum` - broken intra page link number

#### setBrokenSkipMainNum

    public void setBrokenSkipMainNum(int brokenSkipMainNum)

Set broken skip to main content link number

Parameters:
  `brokenSkipMainNum` - broken skip to main content link number

#### setFlashData

    public void setFlashData(Vector<FlashData> flashV)

Set flash information of the page

Parameters:
  `flashV` - Vector of flash information of the page

#### setForwardIntraPageLinkNum

    public void setForwardIntraPageLinkNum(int forwardIntraPageLinkNum)

Set number of forward intra page link

Parameters:
  `forwardIntraPageLinkNum` - number of forward intra page link

#### setHeadingsData

    public void setHeadingsData(Vector<HeadingsData> headings)

Set headings information of the page

Parameters:
  `headings` - Vector of headings information of the page

#### setImageAltErrorNum

    public void setImageAltErrorNum(int imageAltErrorNum)

Set error number of alternative text for image

Parameters:
  `imageAltErrorNum` - errors number of alternative text for image

#### setInvalidLinkRatio

    public void setInvalidLinkRatio(double invalidLinkRatio)

Set invalid link ratio of the page. (target URL number under invisible link/all target URL number)

Parameters:
  `invalidLinkRatio` - invalid link ratio

#### setMaxTime

    public void setMaxTime(int maxTime)

Set maximum reaching time of the page

Parameters:
  `maxTime` - maximum reaching time of the page

#### setMissingAltNum

    public void setMissingAltNum(int missingAltNum)

Set number of missing alt attribute for image

Parameters:
  `missingAltNum` - number of missing alt attribute for image

#### setSkipMainNum

    public void setSkipMainNum(int skipMainNum)

Set valid skip to main content link number

Parameters:
  `skipMainNum` - valid skip to main content link number

#### setTotalImageNumber

    public void setTotalImageNumber(int totalImageNumber)

Set total number of image in the page

Parameters:
  `totalImageNumber` - total number of image

#### setTotalLinkNum

    public void setTotalLinkNum(int totalLinkNum)

Set total number of link (anchor element with href attribute) in the page

Parameters:
  `totalLinkNum` -

#### setWrongAltNum

    public void setWrongAltNum(int wrongAltNum)

Set number of inappropriate alternative text in the page

Parameters:
  `wrongAltNum` - number of inappropriate alternative text

#### hasFrame

    public boolean hasFrame()

Returns:
  true if page has child frame

#### setHasFrame

    public void setHasFrame(boolean hasFrame)

Set if page has child frame or not

Parameters:
  `hasFrame` -

#### isError

    public boolean isError()

Set if page is error page

Returns:

#### setError

    public void setError(boolean isError)

Parameters:
  `isError` - true if page is error page

#### visit

    public void visit(IProblemItem item)

Description copied from interface: `IProblemItemVisitor`
Visit `IProblemItem` and do something.

Specified by:
  `visit` in interface `IProblemItemVisitor`
Parameters:
  `item` - target `IProblemItem` to visit