Package org.geotools.xml.schema

Examples of org.geotools.xml.schema.Element


            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


      if (children == null) {
                return null;
            }

            for (int i = 0; i < children.length; i++) {
                Element t = children[i].findChildElement(localName, namespaceURI);

                if (t != null) { // found it

                    return t;
                }
View Full Code Here

            for (int i = 0; i < value.length; i++) {
                if ((value[i] == null) || value[i].getElement() == null) {
                    continue;
                }

                Element e = value[i].getElement();
                if(elems[EXTERNALGRAPHIC].getName().equals(e.getName()))
                    symbol.addExternalGraphic((ExternalGraphic)value[i].getValue());

                if(elems[MARK].getName().equals(e.getName()))
                    symbol.addMark((Mark)value[i].getValue());

                if(elems[OPACITY].getName().equals(e.getName()))
                    symbol.setOpacity((Expression)value[i].getValue());

                if(elems[SIZE].getName().equals(e.getName()))
                    symbol.setSize((Expression)value[i].getValue());

                if(elems[ROTATION].getName().equals(e.getName()))
                    symbol.setRotation((Expression)value[i].getValue());
            }
           
            return symbol;
        }
View Full Code Here

            if (elements == null) {
                return null;
            }

            for (int i = 0; i < elements.length; i++) {
                Element t = elements[i].findChildElement(name);

                if (t != null) { // found it

                    return t;
                }
View Full Code Here

      if (elements == null) {
                return null;
            }

            for (int i = 0; i < elements.length; i++) {
                Element t = elements[i].findChildElement(localName, namespaceURI);

                if (t != null) { // found it

                    return t;
                }
View Full Code Here

            for (int i = 0; i < value.length; i++) {
                if ((value[i] == null) || value[i].getElement() == null) {
                    continue;
                }

                Element e = value[i].getElement();
                if(elems[GRAPHICFILL].getName().equals(e.getName()))
                    symbol.setGraphicFill((Graphic)value[i].getValue());

                if(elems[CSSPARAMETER].getName().equals(e.getName())){
                    Expression css = (Expression)value[i].getValue();
                    // TODO apply the css
                }
            }
           
View Full Code Here

        } else {
            cache.type = ((ComplexTypeHandler) child).compress(parent);
        }

        if (ref != null) {
            Element e = parent.lookUpElement(ref);

            if (e == null) {
                throw new SAXException("Element '" + ref
                    + "' was referenced and not found");
            }

            cache.name = e.getName();
            cache.type = e.getType();

            if ((defaulT == null) || "".equalsIgnoreCase(defaulT)) {
                cache.defaulT = e.getDefault();
            }

            if ((fixed == null) || "".equalsIgnoreCase(fixed)) {
                cache.fixed = e.getFixed();
            }

            if (block == 0) {
                cache.block = e.getBlock();
            }

            if (finaL == 0) {
                cache.finaL = e.getFinal();
            }

            cache.minOccurs = (minOccurs == 1) ? e.getMinOccurs() : minOccurs;
            cache.maxOccurs = (maxOccurs == 1) ? e.getMaxOccurs() : maxOccurs;

            if (substitutionGroup != null) {
                cache.substitutionGroup = e.getSubstitutionGroup();
            }
        }

        //  TODO add constraint checking
View Full Code Here

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

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

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

    private static final Logger logger = Logger
            .getLogger(ElementHandlerFactoryTest.class.getName());

    public void testCreateElementHandlerIgnoresUnknownTypes() {
        ElementHandlerFactory factory = new ElementHandlerFactory(logger);
        Element el = new ElementGT("test", "test",
                URI.create("http://www.geotools.org"), /* Type */ null, 0, 0, false, null,
                false);
        try {
            XMLElementHandler elementHandler = factory.createElementHandler(el);
            assertNotNull(elementHandler);
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.