Project

General

Profile

Download (962 Bytes) Statistics
| Branch: | Tag: | Revision:
1
// $Id$
2
/**
3
* Copyright (C) 2011 EDIT
4
* European Distributed Institute of Taxonomy
5
* http://www.e-taxonomy.eu
6
*
7
* The contents of this file are subject to the Mozilla Public License Version 1.1
8
* See LICENSE.TXT at the top of this package for the full license terms.
9
*/
10
package eu.etaxonomy.dataportal.elements;
11

    
12
import java.util.ArrayList;
13
import java.util.List;
14

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

    
18
public class DescriptionElementRepresentation extends BaseElement{
19

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

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

    
26
	/**
27
	 * @param element
28
	 */
29
	public DescriptionElementRepresentation(WebElement element) {
30
		super(element);
31

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

    
41
}
(2-2/6)