Package org.geoserver.gss

Examples of org.geoserver.gss.GetDiffType


        return GetDiffType.class;
    }

    @Override
    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        GetDiffType gd = new GetDiffType();
        if (node.hasAttribute("fromVersion")) {
            gd.setFromVersion(((Number) node.getAttributeValue("fromVersion")).longValue());
        }
        if (node.hasAttribute("typeName")) {
            gd.setTypeName((QName) node.getAttributeValue("typeName"));
        }
        setServiceVersion(node, gd);

        return gd;
    }
View Full Code Here


        return gd;
    }

    @Override
    public Object getProperty(Object object, QName name) throws Exception {
        GetDiffType pd = (GetDiffType) object;

        if (name.getLocalPart().equals("typeName")) {
            return pd.getTypeName();
        } else if (name.getLocalPart().equals("fromVersion")) {
            return pd.getFromVersion();
        }

        return super.getProperty(object, name);
    }
View Full Code Here

public class GetDiffTypeBindingTest extends GSSXMLTestSupport {

    public void testParse() throws Exception {
        document = dom("GetDiffRequest.xml");
        GetDiffType gd = (GetDiffType) parse(GSS.GetDiffType);

        assertEquals("GSS", gd.getService());
        assertEquals("1.0.0", gd.getVersion());
        assertEquals("http://www.openplans.org/spearfish", gd.getTypeName().getNamespaceURI());
        assertEquals("restricted", gd.getTypeName().getLocalPart());
    }
View Full Code Here

        assertEquals("http://www.openplans.org/spearfish", gd.getTypeName().getNamespaceURI());
        assertEquals("restricted", gd.getTypeName().getLocalPart());
    }

    public void testEncode() throws Exception {
        GetDiffType gd = new GetDiffType();
        gd.setTypeName(new QName(SF_NAMESPACE, "restricted"));
        gd.setFromVersion(15);

        Document doc = encode(gd, GSS.GetDiff);
        print(doc);
        assertXpathEvaluatesTo("GSS", "/gss:GetDiff/@service", doc);
        assertXpathEvaluatesTo("1.0.0", "/gss:GetDiff/@version", doc);
View Full Code Here

public class GetDiffTypeBindingTest extends GSSXMLTestSupport {

    public void testParse() throws Exception {
        document = dom("GetDiffRequest.xml");
        GetDiffType gd = (GetDiffType) parse(GSS.GetDiffType);

        assertEquals("GSS", gd.getService());
        assertEquals("1.0.0", gd.getVersion());
        assertEquals("http://www.openplans.org/spearfish", gd.getTypeName().getNamespaceURI());
        assertEquals("restricted", gd.getTypeName().getLocalPart());
    }
View Full Code Here

        assertEquals("http://www.openplans.org/spearfish", gd.getTypeName().getNamespaceURI());
        assertEquals("restricted", gd.getTypeName().getLocalPart());
    }

    public void testEncode() throws Exception {
        GetDiffType gd = new GetDiffType();
        gd.setTypeName(new QName(SF_NAMESPACE, "restricted"));
        gd.setFromVersion(15);

        Document doc = encode(gd, GSS.GetDiff);
        print(doc);
        assertXpathEvaluatesTo("GSS", "/gss:GetDiff/@service", doc);
        assertXpathEvaluatesTo("1.0.0", "/gss:GetDiff/@version", doc);
View Full Code Here

        return GetDiffType.class;
    }

    @Override
    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        GetDiffType gd = new GetDiffType();
        if (node.hasAttribute("fromVersion")) {
            gd.setFromVersion(((Number) node.getAttributeValue("fromVersion")).longValue());
        }
        if (node.hasAttribute("typeName")) {
            gd.setTypeName((QName) node.getAttributeValue("typeName"));
        }
        setServiceVersion(node, gd);

        return gd;
    }
View Full Code Here

        return gd;
    }

    @Override
    public Object getProperty(Object object, QName name) throws Exception {
        GetDiffType pd = (GetDiffType) object;

        if (name.getLocalPart().equals("typeName")) {
            return pd.getTypeName();
        } else if (name.getLocalPart().equals("fromVersion")) {
            return pd.getFromVersion();
        }

        return super.getProperty(object, name);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.gss.GetDiffType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.