Package org.geotools.styling

Examples of org.geotools.styling.FeatureTypeConstraint


            layerStyles = ((UserLayer) layer).getUserStyles();
        }

        // DJB: TODO: this needs to do the whole thing, not just names
        if (ftcs != null) {
            FeatureTypeConstraint ftc;
            final int length = ftcs.length;

            for (int t = 0; t < length; t++) {
                ftc = ftcs[t];

                if (ftc.getFeatureTypeName() != null) {
                    String ftc_name = ftc.getFeatureTypeName();

                    // taken from lite renderer
                    boolean matches;

                    try {
View Full Code Here


                FeatureTypeConstraint[] featureTypeConstraints = layer.getLayerFeatureConstraints();
                if (featureTypeConstraints != null) {
                    List<Filter> filters = new ArrayList<Filter>();
                    for (int j = 0; j < featureTypeConstraints.length; j++) {
                        FeatureTypeConstraint featureTypeConstraint = featureTypeConstraints[j];
                        filters.add(featureTypeConstraint.getFilter());
                    }
                    ;
                    combined = filterFac.and(combined, filterFac.and(filters));
                }
                combinedList[i] = combined;
View Full Code Here

      if ((child == null) || (child.getNodeType() != Node.ELEMENT_NODE)) {
        continue;
      }
      String childName = child.getLocalName();
      if (childName.equalsIgnoreCase("FeatureTypeConstraint")) {
        final FeatureTypeConstraint ftc = parseFeatureTypeConstraint(child);
        if (ftc != null)
          featureTypeConstraints.add(ftc);
      }
    }
    return (FeatureTypeConstraint[]) featureTypeConstraints
View Full Code Here

        .toArray(new FeatureTypeConstraint[featureTypeConstraints
            .size()]);
  }

  protected FeatureTypeConstraint parseFeatureTypeConstraint(Node root) {
    FeatureTypeConstraint ftc = new FeatureTypeConstraintImpl();

    NodeList children = root.getChildNodes();
    final int length = children.getLength();
    for (int i = 0; i < length; i++) {
      Node child = children.item(i);
      if ((child == null) || (child.getNodeType() != Node.ELEMENT_NODE)) {
        continue;
      }
      String childName = child.getLocalName();
      if (childName.equalsIgnoreCase("FeatureTypeName")) {
        ftc.setFeatureTypeName(getFirstChildValue(child));
      } else if (childName.equalsIgnoreCase("Filter")) {
        ftc.setFilter(parseFilter(child));
      }
    }
    ftc.setExtents(new Extent[0]);
    if (ftc.getFeatureTypeName() == null)
      return null;
    else
      return ftc;
  }
View Full Code Here

            layerStyles = ((UserLayer) layer).getUserStyles();
        }

        // DJB: TODO: this needs to do the whole thing, not just names
        if (ftcs != null) {
            FeatureTypeConstraint ftc;
            final int length = ftcs.length;

            for (int t = 0; t < length; t++) {
                ftc = ftcs[t];

                if (ftc.getFeatureTypeName() != null) {
                    String ftc_name = ftc.getFeatureTypeName();

                    // taken from lite renderer
                    boolean matches;

                    try {
View Full Code Here

                FeatureTypeConstraint[] featureTypeConstraints = layer.getLayerFeatureConstraints();
                if (featureTypeConstraints != null) {
                    List<Filter> filters = new ArrayList<Filter>();
                    for (int j = 0; j < featureTypeConstraints.length; j++) {
                        FeatureTypeConstraint featureTypeConstraint = featureTypeConstraints[j];
                        filters.add(featureTypeConstraint.getFilter());
                    }
                    ;
                    combined = ff.and(combined, ff.and(filters));
                }
                combinedList[i] = combined;
View Full Code Here

            layerStyles = ((UserLayer) layer).getUserStyles();
        }

        // DJB: TODO: this needs to do the whole thing, not just names
        if (ftcs != null) {
            FeatureTypeConstraint ftc;
            final int length = ftcs.length;

            for (int t = 0; t < length; t++) {
                ftc = ftcs[t];

                if (ftc.getFeatureTypeName() != null) {
                    String ftc_name = ftc.getFeatureTypeName();

                    // taken from lite renderer
                    boolean matches;

                    try {
View Full Code Here

      //DJB:  TODO: this needs to do the whole thing, not just names
      if (ftcs != null)
      {
        for (int t=0;t<ftcs.length;t++)
        {
          FeatureTypeConstraint ftc = ftcs[t];
          if (ftc.getFeatureTypeName() != null)
          {
            String ftc_name = ftc.getFeatureTypeName();
              //taken from lite renderer
            boolean matches ;
            try{
              matches = currLayer.getFeatureType().isDescendedFrom(null,ftc_name) || currLayer.getFeatureType().getTypeName().equalsIgnoreCase(ftc_name);
            }
View Full Code Here

            layerStyles = ((UserLayer) layer).getUserStyles();
        }

        // DJB: TODO: this needs to do the whole thing, not just names
        if (ftcs != null) {
            FeatureTypeConstraint ftc;
            final int length = ftcs.length;

            for (int t = 0; t < length; t++) {
                ftc = ftcs[t];

                if (ftc.getFeatureTypeName() != null) {
                    String ftc_name = ftc.getFeatureTypeName();

                    // taken from lite renderer
                    boolean matches;

                    try {
View Full Code Here

TOP

Related Classes of org.geotools.styling.FeatureTypeConstraint

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.