Package org.geoserver.gss

Examples of org.geoserver.gss.GetCentralRevisionType


    }
   
    @Override
    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        List<QName> typeNames = node.getChildValues(QName.class);
        GetCentralRevisionType result = new GetCentralRevisionType();
        result.getTypeNames().addAll(typeNames);
        setServiceVersion(node, result);
       
        return result;
    }
View Full Code Here


public class GetCentralRevisionTypeBindingTest extends GSSXMLTestSupport {

    public void testParseOne() throws Exception {
        document = dom("GetCentralRevisionRequest.xml");
        GetCentralRevisionType gcr = (GetCentralRevisionType) parse(GSS.GetCentralRevisionType);
       
        assertEquals(1, gcr.getTypeNames().size());
        assertEquals("archsites", gcr.getTypeNames().get(0).getLocalPart());
        assertEquals(SF_NAMESPACE, gcr.getTypeNames().get(0).getNamespaceURI());
        assertEquals("GSS", gcr.getService());
        assertEquals("1.0.0", gcr.getVersion());
    }
View Full Code Here

        assertEquals("1.0.0", gcr.getVersion());
    }
   
    public void testParseTwo() throws Exception {
        document = dom("GetCentralRevisionRequestTwoTypes.xml");
        GetCentralRevisionType gcr = (GetCentralRevisionType) parse(GSS.GetCentralRevisionType);
       
        assertEquals(2, gcr.getTypeNames().size());
        assertEquals("archsites", gcr.getTypeNames().get(0).getLocalPart());
        assertEquals(SF_NAMESPACE, gcr.getTypeNames().get(0).getNamespaceURI());
        assertEquals("restricted", gcr.getTypeNames().get(1).getLocalPart());
        assertEquals(SF_NAMESPACE, gcr.getTypeNames().get(1).getNamespaceURI());
    }
View Full Code Here

        assertEquals("restricted", gcr.getTypeNames().get(1).getLocalPart());
        assertEquals(SF_NAMESPACE, gcr.getTypeNames().get(1).getNamespaceURI());
    }
   
    public void testEncode() throws Exception {
        GetCentralRevisionType gcr = new GetCentralRevisionType();
        gcr.getTypeNames().add(new QName(SF_NAMESPACE, "archsites"));
        gcr.getTypeNames().add(new QName(SF_NAMESPACE, "restricted"));
       
        Document doc = encode(gcr, GSS.GetCentralRevision);
        // print(doc);
        assertXpathEvaluatesTo("2", "count(//gss:GetCentralRevision/gss:TypeName)", doc);
        assertXpathEvaluatesTo("sf:archsites", "//gss:GetCentralRevision/gss:TypeName[1]", doc);
View Full Code Here

public class GetCentralRevisionTypeBindingTest extends GSSXMLTestSupport {

    public void testParseOne() throws Exception {
        document = dom("GetCentralRevisionRequest.xml");
        GetCentralRevisionType gcr = (GetCentralRevisionType) parse(GSS.GetCentralRevisionType);
       
        assertEquals(1, gcr.getTypeNames().size());
        assertEquals("archsites", gcr.getTypeNames().get(0).getLocalPart());
        assertEquals(SF_NAMESPACE, gcr.getTypeNames().get(0).getNamespaceURI());
        assertEquals("GSS", gcr.getService());
        assertEquals("1.0.0", gcr.getVersion());
    }
View Full Code Here

        assertEquals("1.0.0", gcr.getVersion());
    }
   
    public void testParseTwo() throws Exception {
        document = dom("GetCentralRevisionRequestTwoTypes.xml");
        GetCentralRevisionType gcr = (GetCentralRevisionType) parse(GSS.GetCentralRevisionType);
       
        assertEquals(2, gcr.getTypeNames().size());
        assertEquals("archsites", gcr.getTypeNames().get(0).getLocalPart());
        assertEquals(SF_NAMESPACE, gcr.getTypeNames().get(0).getNamespaceURI());
        assertEquals("restricted", gcr.getTypeNames().get(1).getLocalPart());
        assertEquals(SF_NAMESPACE, gcr.getTypeNames().get(1).getNamespaceURI());
    }
View Full Code Here

        assertEquals("restricted", gcr.getTypeNames().get(1).getLocalPart());
        assertEquals(SF_NAMESPACE, gcr.getTypeNames().get(1).getNamespaceURI());
    }
   
    public void testEncode() throws Exception {
        GetCentralRevisionType gcr = new GetCentralRevisionType();
        gcr.getTypeNames().add(new QName(SF_NAMESPACE, "archsites"));
        gcr.getTypeNames().add(new QName(SF_NAMESPACE, "restricted"));
       
        Document doc = encode(gcr, GSS.GetCentralRevision);
        // print(doc);
        assertXpathEvaluatesTo("2", "count(//gss:GetCentralRevision/gss:TypeName)", doc);
        assertXpathEvaluatesTo("sf:archsites", "//gss:GetCentralRevision/gss:TypeName[1]", doc);
View Full Code Here

    }
   
    @Override
    public Object parse(ElementInstance instance, Node node, Object value) throws Exception {
        List<QName> typeNames = node.getChildValues(QName.class);
        GetCentralRevisionType result = new GetCentralRevisionType();
        result.getTypeNames().addAll(typeNames);
        setServiceVersion(node, result);
       
        return result;
    }
View Full Code Here

TOP

Related Classes of org.geoserver.gss.GetCentralRevisionType

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.