view flys-artifacts/src/main/java/de/intevation/flys/artifacts/access/MapAccess.java @ 5449:504a62887217

Datacage: Compile XPath expressions and reuse them. With the introduction of filters in dc:elements XPath expressions are evalutated very often so compiling them should reduce the overhead significantly.
author Sascha L. Teichmann <teichmann@intevation.de>
date Wed, 27 Mar 2013 10:59:55 +0100
parents 6131b352e5e4
children
line wrap: on
line source
package de.intevation.flys.artifacts.access;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import de.intevation.artifacts.CallContext;
import de.intevation.flys.artifacts.FLYSArtifact;


public class MapAccess
extends RangeAccess
{

    public MapAccess(FLYSArtifact artifact, CallContext context) {
        super(artifact, context);
    }

    public List<String> getHWS() {
        String param = getString("uesk.hws");
        if (param != null) {
            String[] split = param.split(";");
            return new ArrayList<String>(Arrays.asList(split));
        }
        return new ArrayList<String>();
    }
}

http://dive4elements.wald.intevation.org