Search in sources :

Example 1 with Map

use of eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.AlignmentType.Map in project hale by halestudio.

the class OmlRdfGenerator method getMaps.

/**
 * Converts from List of ICell to the List of Map
 *
 * @param map
 * @return
 */
private Collection<? extends Map> getMaps(List<ICell> map) {
    ArrayList<Map> maps = new ArrayList<Map>(map.size());
    Iterator<?> iterator = map.iterator();
    Map jMap;
    ICell cell;
    while (iterator.hasNext()) {
        cell = (ICell) iterator.next();
        if (cell != null) {
            jMap = new Map();
            jMap.setCell(getCellType(cell));
            maps.add(jMap);
        }
    }
    return maps;
}
Also used : ArrayList(java.util.ArrayList) Map(eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.AlignmentType.Map) ICell(eu.esdihumboldt.hale.io.oml.internal.model.align.ICell)

Example 2 with Map

use of eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.AlignmentType.Map in project hale by halestudio.

the class OmlRdfReader method getMap.

/**
 * @param map List of the generated maps, containing cell{@link CellType}
 *            and String about
 * @return List of Cells {@link Cell}
 */
private List<ICell> getMap(List<Map> maps) {
    List<ICell> cells = new ArrayList<ICell>(maps.size());
    Cell cell;
    Map map;
    Iterator<Map> iterator = maps.iterator();
    while (iterator.hasNext()) {
        map = iterator.next();
        if (map.getCell() != null) {
            cell = getCell(map.getCell());
            cells.add(cell);
        }
    }
    return cells;
}
Also used : ArrayList(java.util.ArrayList) Cell(eu.esdihumboldt.hale.io.oml.internal.goml.align.Cell) ICell(eu.esdihumboldt.hale.io.oml.internal.model.align.ICell) Map(eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.AlignmentType.Map) ICell(eu.esdihumboldt.hale.io.oml.internal.model.align.ICell)

Aggregations

ICell (eu.esdihumboldt.hale.io.oml.internal.model.align.ICell)2 Map (eu.esdihumboldt.hale.io.oml.internal.model.generated.oml.AlignmentType.Map)2 ArrayList (java.util.ArrayList)2 Cell (eu.esdihumboldt.hale.io.oml.internal.goml.align.Cell)1