1
|
/**
|
2
|
* Copyright (C) 2012 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.dataportal.elements;
|
10
|
|
11
|
import org.openqa.selenium.By;
|
12
|
import org.openqa.selenium.WebElement;
|
13
|
|
14
|
/**
|
15
|
* @author andreas
|
16
|
* @date May 21, 2012
|
17
|
*
|
18
|
*/
|
19
|
public class ClassificationTreeElement extends BaseElement {
|
20
|
|
21
|
|
22
|
private String taxonName;
|
23
|
|
24
|
private String linkUrl;
|
25
|
|
26
|
|
27
|
private boolean isFocused;
|
28
|
|
29
|
public String getTaxonName() {
|
30
|
return taxonName;
|
31
|
}
|
32
|
|
33
|
public String getLinkUrl() {
|
34
|
return linkUrl;
|
35
|
}
|
36
|
|
37
|
public boolean isFocused() {
|
38
|
return isFocused;
|
39
|
}
|
40
|
|
41
|
public ClassificationTreeElement(WebElement element) {
|
42
|
super(element);
|
43
|
taxonName = element.getText();
|
44
|
for(String classAttribute : getClassAttributes()){
|
45
|
if(classAttribute.equals("focused")){
|
46
|
isFocused = true;
|
47
|
break;
|
48
|
}
|
49
|
}
|
50
|
linkUrl = element.findElement(By.tagName("a")).getAttribute("href");
|
51
|
}
|
52
|
|
53
|
|
54
|
|
55
|
|
56
|
|
57
|
|
58
|
}
|