Project

General

Profile

Download (929 Bytes) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2011 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 java.util.ArrayList;
12
import java.util.List;
13

    
14
import org.openqa.selenium.By;
15
import org.openqa.selenium.WebElement;
16

    
17
public class DescriptionElementRepresentation extends BaseElement{
18

    
19
	List sources = new ArrayList(); // may be LinkElement or BaseElement
20

    
21
	public List getSources() {
22
		return sources;
23
	}
24

    
25

    
26
	public DescriptionElementRepresentation(WebElement element) {
27
		super(element);
28

    
29
		for (WebElement source : element.findElements(By.className("sources"))) {
30
			if(source.getTagName().equals("a")){
31
				sources.add(new LinkElement(source));
32
			} else {
33
				sources.add(new BaseElement(source));
34
			}
35
		}
36
	}
37

    
38

    
39

    
40
}
(4-4/22)