use of de.lmu.ifi.dbs.elki.utilities.xml.XMLNodeIterator in project elki by elki-project.
the class GeneratorXMLDatabaseConnection method processElementPoint.
/**
* Parse a 'point' element (point vector for a static cluster)
*
* @param points current list of points (to append to)
* @param cur Current document nod
*/
private void processElementPoint(List<double[]> points, Node cur) {
double[] point = null;
String vstr = ((Element) cur).getAttribute(ATTR_VECTOR);
if (vstr != null && vstr.length() > 0) {
point = parseVector(vstr);
}
if (point == null) {
throw new AbortException("No translation vector given.");
}
// *** add new point
points.add(point);
// TODO: check for unknown attributes.
XMLNodeIterator iter = new XMLNodeIterator(cur.getFirstChild());
while (iter.hasNext()) {
Node child = iter.next();
if (child.getNodeType() == Node.ELEMENT_NODE) {
LOG.warning("Unknown element in XML specification file: " + child.getNodeName());
}
}
}
Aggregations