Examples of XSQNameBinding


Examples of org.geotools.xs.bindings.XSQNameBinding

        //<xsd:element name="Name" type="xsd:string">
        String name = (String) node.getChildValue("Name");

        //turn into qname
        QName qName = (QName) new XSQNameBinding(namespaceContext).parse(null, name);
        property.setName(qName);

        //<xsd:element minOccurs="0" name="Value">
        if (node.hasChild("Value")) {
            Object object = node.getChildValue("Value");
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

               
                //turn into list of qname
                List qNames = new ArrayList();
                for (Object s : q.getTypeNames()) {
                    try {
                        qNames.add(new XSQNameBinding(namespaceContext).parse(null, s));
                    }
                    catch (Exception e) {
                        throw new RuntimeException(e);
                    }
                }
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

    }

    public String encode(Object object, String value) throws Exception {
        GeometryOperand operand = (GeometryOperand) object;

        return new XSQNameBinding(namespaceContext).encode(new QName(operand.getNamespaceURI(),
                operand.getLocalPart()), value);
    }
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

    return GPKG.geopkgtype_features;
  }
 
  @Override
        public Layer parseLayer(ElementInstance instance, Node node, Object value) throws Exception {
      XSQNameBinding nameBinding = new XSQNameBinding(namespaceContext);
     
            GeoPackageProcessRequest.FeaturesLayer layer = new GeoPackageProcessRequest.FeaturesLayer();
            layer.setFeatureType((QName) nameBinding.parse(null, (String) node.getChildValue("featuretype")));
            String pns = (String) node.getChildValue("propertynames");
            if (pns != null) {              
                Set<QName> qnames = new HashSet<QName>();
                for (String pn : Arrays.asList(pns.split(","))) {
                    qnames.add( (QName) nameBinding.parse(null, pn.trim() ));
                }
                layer.setPropertyNames( qnames);
            }
            layer.setFilter((Filter) node.getChildValue("filter"));
            return layer;
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

    return GPKG.geopkgtype_tiles;
  }
 
        @Override
        public Layer parseLayer(ElementInstance instance, Node node, Object value) throws Exception {
            XSQNameBinding nameBinding = new XSQNameBinding(namespaceContext);
           
            GeoPackageProcessRequest.TilesLayer layer = new GeoPackageProcessRequest.TilesLayer();
            List<QName> layers = new ArrayList<QName>();
            for (String layerName: Arrays.asList(((String) node.getChildValue("layers")).split(","))) {
               layers.add((QName) nameBinding.parse(null, layerName.trim() ));
            }
            layer.setLayers(layers);
            String styleNames = (String) node.getChildValue("styles");           
            if (styleNames != null) {               
                List<String> styles = new ArrayList<String>();
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

            QueryType query = (QueryType) object;
            if (!query.getTypeName().isEmpty()) {
                //bit of a hack but handle both string and qname
                Object obj = query.getTypeName().get(0);
                if (obj instanceof String) {
                    obj = new XSQNameBinding(namespaceContext).parse(null, obj);
                }
                return obj;
            }
            return null;
        }
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

   
    @Override
    protected void setProperty(EObject eObject, String property, Object value, boolean lax) {
        if ("value".equals(property)) {
            try {
                Object qname = new XSQNameBinding(namespaceContext).parse(null, value);
                super.setProperty(eObject, property, qname, lax);
            }
            catch (Exception e) {
                throw new RuntimeException(e);
            }
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

    public String encode(Object object, String value) throws Exception {
        StringBuffer sb = new StringBuffer();
        List l = (List) object;
        if (l != null && !l.isEmpty()) {
            for (Object o : l) {
                sb.append(new XSQNameBinding(namespaceContext).encode(o, null)).append(" ");
            }
            sb.setLength(sb.length()-1);
        }
       
        return sb.toString();
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

        //&lt;xsd:element name="Name" type="xsd:string"&gt;
        String name = (String) node.getChildValue("Name");

        //turn into qname
        QName qName = (QName) new XSQNameBinding(namespaceContext).parse(null, name);
        property.setName(qName);

        //&lt;xsd:element minOccurs="0" name="Value"&gt;
        if (node.hasChild("Value")) {
            Object object = node.getChildValue("Value");
View Full Code Here

Examples of org.geotools.xs.bindings.XSQNameBinding

        //&lt;xsd:element name="Name" type="xsd:string"&gt;
        String name = (String) node.getChildValue("Name");

        //turn into qname
        QName qName = (QName) new XSQNameBinding(namespaceContext).parse(null, name);
        property.setName(qName);

        //&lt;xsd:element minOccurs="0" name="Value"&gt;
        if (node.hasChild("Value")) {
            Object object = node.getChildValue("Value");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.