Package org.geotools.xml.schema

Examples of org.geotools.xml.schema.Element


         * @throws OperationNotSupportedException
         * @see schema.Type#getValue(java.util.List)
         */
        public Object getValue(Element element, ElementValue[] value,
            Attributes attrs, Map hints) throws OperationNotSupportedException, SAXException {
            Element e = value[0].getElement();

            if (e == null) {
              if(!element.isNillable())
                throw new SAXException(
                      "Internal error, ElementValues require an associated Element.");
View Full Code Here


         * @throws OperationNotSupportedException
         * @see schema.Type#getValue(java.util.List)
         */
        public Object getValue(Element element, ElementValue[] value,
            Attributes attrs, Map hints) throws OperationNotSupportedException, SAXException {
            Element e = value[0].getElement();

            if (e == null) {
              if(!element.isNillable())
                throw new SAXException(
                      "Internal error, ElementValues require an associated Element.");
View Full Code Here

         * @throws OperationNotSupportedException
         * @see schema.Type#getValue(java.util.List)
         */
        public Object getValue(Element element, ElementValue[] value,
            Attributes attrs, Map hints) throws OperationNotSupportedException, SAXException {
            Element e = value[0].getElement();

            if (e == null) {
              if(!element.isNillable())
                throw new SAXException(
                      "Internal error, ElementValues require an associated Element.");
View Full Code Here

            }else{
              throw new IOException("Bounding box required for the FeatureCollection");
            }

            SimpleFeatureIterator i = fc.features();
            Element e = null;

            while (i.hasNext()) {
                SimpleFeature f = i.next();
                output.startElement(GMLSchema.NAMESPACE, "featureMember", null);

                if (e == null) { // first time
                    e = output.findElement(f.getFeatureType().getTypeName());
                    // should go to an abstract FT eventually
                    ComplexType t = e.getType() instanceof ComplexType? (ComplexType)e.getType():null;
                    while(t!=null && t!=AbstractFeatureType.getInstance())
                        t = t.getParent() instanceof ComplexType? (ComplexType)t.getParent():null;
                    if(t!=AbstractFeatureType.getInstance()){
                        // not the right element ... try by type
                        e = output.findElement(value);
                        // should go to an abstract FT eventually
                        t = e.getType() instanceof ComplexType? (ComplexType)e.getType():null;
                        while(t!=null && t!=AbstractFeatureType.getInstance())
                            t = t.getParent() instanceof ComplexType? (ComplexType)t.getParent():null;
                        if(t!=AbstractFeatureType.getInstance()){
                            throw new OperationNotSupportedException("Could not find a correct Element for FeatureType "+f.getFeatureType().getTypeName());
                        }
View Full Code Here

            if (value.length > 1) {
                throw new SAXException("Cannot have more than one coord per "
                    + getName());
            }

            Element e = value[0].getElement();

            if (e == null) {
              if(!element.isNillable())
                throw new SAXException(
                      "Internal error, ElementValues require an associated Element.");
View Full Code Here

         * @throws OperationNotSupportedException
         * @see schema.Type#getValue(java.util.List)
         */
        public Object getValue(Element element, ElementValue[] value,
            Attributes attrs, Map hints) throws OperationNotSupportedException, SAXException {
            Element e = value[0].getElement();

            if (e == null) {
              if(!element.isNillable())
                throw new SAXException(
                      "Internal error, ElementValues require an associated Element.");
View Full Code Here

        /**
         * @see schema.Type#getValue(java.util.List)
         */
        public Object getValue(Element element, ElementValue[] value,
            Attributes attrs, Map hints) throws SAXException {
            Element e = value[0].getElement();

            if (e == null) {
              if(!element.isNillable())
                throw new SAXException(
                      "Internal error, ElementValues require an associated Element.");
View Full Code Here

         * @throws OperationNotSupportedException
         * @see schema.Type#getValue(java.util.List)
         */
        public Object getValue(Element element, ElementValue[] value,
            Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException {
            Element e = value[0].getElement();

            if (e == null) {
              if(!element.isNillable())
                throw new SAXException(
                      "Internal error, ElementValues require an associated Element.");
View Full Code Here

         * @throws OperationNotSupportedException
         * @see schema.Type#getValue(java.util.List)
         */
        public Object getValue(Element element, ElementValue[] value,
            Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException {
            Element e = value[0].getElement();

            if (e == null) {
              if(!element.isNillable())
                throw new SAXException(
                      "Internal error, ElementValues require an associated Element.");
View Full Code Here

        public Element findChildElement(String name) {
            if (children == null) {
                return null;
            }
            for (int i = 0; i < children.length; i++) {
                Element t = children[i].findChildElement(name);
                if (t != null) { // found it

                    return t;
                }
            }
View Full Code Here

TOP

Related Classes of org.geotools.xml.schema.Element

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.