All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.ac.rdg.resc.edal.graphics.style.sld.AbstractSLDInterpolateFunction Maven / Gradle / Ivy

There is a newer version: 1.5.3
Show newest version
package uk.ac.rdg.resc.edal.graphics.style.sld;

import java.util.List;

import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import uk.ac.rdg.resc.edal.graphics.style.InterpolationPoint;

public abstract class AbstractSLDInterpolateFunction extends AbstractSLDFunction {

	protected List> interpolationPoints;
	
	public AbstractSLDInterpolateFunction(XPath xPath, Node function) {
		super(xPath, function);
	}

	public List> getInterpolationPoints() {
		return this.interpolationPoints;
	}
	
	protected NodeList parseInterpolationPoints() throws XPathExpressionException, SLDException {
		// get list of data points
		NodeList pointNodes = (NodeList) xPath.evaluate(
				"./se:InterpolationPoint", function, XPathConstants.NODESET);
		if (pointNodes == null) {
			throw new SLDException("The interpolate function must contain a list of interpolation points.");
		}
		return pointNodes;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy