Java Examples for org.opengis.feature.type.Schema

The following java examples will help you to understand the usage of org.opengis.feature.type.Schema. These source code samples are taken from different open source projects.

Example 1
Project: geotools_trunk-master  File: GML.java View source code
@Override
public Schema buildTypeMappingProfile(Schema typeSchema) {
    // set with guaranteed iteration order, so that we can put deprecated elements only
    // after the ones that replaced them
    Set profile = new LinkedHashSet();
    //basic
    profile.add(name(GML.MeasureType));
    //geomtetries
    profile.add(name(GML.PointPropertyType));
    profile.add(name(GML.MultiPointPropertyType));
    profile.add(name(GML.LineStringPropertyType));
    profile.add(name(GML.MultiLineStringPropertyType));
    profile.add(name(GML.CurvePropertyType));
    profile.add(name(GML.MultiCurvePropertyType));
    profile.add(name(GML.SurfacePropertyType));
    profile.add(name(GML.MultiSurfacePropertyType));
    // register polygon and multipolygon only after surface, the iteration order
    // will make sure surface is found before in any encoding attempt, this way we
    // are still able to handle polygons, but we don't use them by default
    profile.add(name(GML.PolygonPropertyType));
    profile.add(name(GML.MultiPolygonPropertyType));
    //profile.add( new NameImpl(  GML.NAMESPACE, GML.AbstractGeometryType ) );
    profile.add(name(GML.GeometryPropertyType));
    profile.add(name(GML.MultiGeometryPropertyType));
    return typeSchema.profile(profile);
}
Example 2
Project: geotools-master  File: GML.java View source code
@Override
public Schema buildTypeMappingProfile(Schema typeSchema) {
    // set with guaranteed iteration order, so that we can put deprecated elements only
    // after the ones that replaced them
    Set profile = new LinkedHashSet();
    //basic
    profile.add(name(GML.MeasureType));
    //geomtetries
    profile.add(name(GML.PointPropertyType));
    profile.add(name(GML.MultiPointPropertyType));
    profile.add(name(GML.LineStringPropertyType));
    profile.add(name(GML.MultiLineStringPropertyType));
    profile.add(name(GML.CurvePropertyType));
    profile.add(name(GML.MultiCurvePropertyType));
    profile.add(name(GML.SurfacePropertyType));
    profile.add(name(GML.MultiSurfacePropertyType));
    // register polygon and multipolygon only after surface, the iteration order
    // will make sure surface is found before in any encoding attempt, this way we
    // are still able to handle polygons, but we don't use them by default
    profile.add(name(GML.PolygonPropertyType));
    profile.add(name(GML.MultiPolygonPropertyType));
    //profile.add( new NameImpl(  GML.NAMESPACE, GML.AbstractGeometryType ) );
    profile.add(name(GML.GeometryPropertyType));
    profile.add(name(GML.MultiGeometryPropertyType));
    return typeSchema.profile(profile);
}
Example 3
Project: geoserver-old-master  File: FeatureTypeSchemaBuilder.java View source code
Name findTypeName(Class binding) {
    for (Iterator p = profiles.iterator(); p.hasNext(); ) {
        Object profile = p.next();
        Name name = null;
        if (profile instanceof TypeMappingProfile) {
            name = ((TypeMappingProfile) profile).name(binding);
        } else if (profile instanceof Schema) {
            Schema schema = (Schema) profile;
            for (Map.Entry<Name, AttributeType> e : schema.entrySet()) {
                AttributeType at = e.getValue();
                if (at.getBinding() != null && at.getBinding().equals(binding)) {
                    name = at.getName();
                    break;
                }
            }
            if (name == null) {
                for (AttributeType at : schema.values()) {
                    if (binding.isAssignableFrom(at.getBinding())) {
                        name = at.getName();
                        break;
                    }
                }
            }
        }
        if (name != null) {
            return name;
        }
    }
    return null;
}
Example 4
Project: geoserver-master  File: CapabilitiesTransformer.java View source code
protected void filterCapabilities() {
    start("fes:Filter_Capabilities");
    start("fes:Conformance");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsQuery" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsAdHocQuery" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsFunctions" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsMinStandardFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsStandardFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "FALSE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsMinSpatialFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsSpatialFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "FALSE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsMinTemporalFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsTemporalFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsVersionNav" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "FALSE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsSorting" }));
    start("ows:AllowedValues");
    element("ows:Value", "ASC");
    element("ows:Value", "DESC");
    end("ows:AllowedValues");
    element("ows:DefaultValue", "ASC");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsExtendedOperators" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "FALSE");
    end("fes:Constraint");
    end("fes:Conformance");
    start("fes:Id_Capabilities");
    element("fes:ResourceIdentifier", null, attributes(new String[] { "name", "fes:ResourceId" }));
    end("fes:Id_Capabilities");
    start("fes:Scalar_Capabilities");
    element("fes:LogicalOperators", null);
    start("fes:ComparisonOperators");
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsLessThan" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsGreaterThan" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsLessThanOrEqualTo" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsGreaterThanOrEqualTo" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsEqualTo" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsNotEqualTo" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsLike" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsBetween" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsNull" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsNil" }));
    end("fes:ComparisonOperators");
    end("fes:Scalar_Capabilities");
    start("fes:Spatial_Capabilities");
    start("fes:GeometryOperands");
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:Envelope" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:Point" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:MultiPoint" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:LineString" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:MultiLineString" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:Polygon" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:MultiPolygon" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:MultiGeometry" }));
    end("fes:GeometryOperands");
    start("fes:SpatialOperators");
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Disjoint" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Equals" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "DWithin" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Beyond" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Intersects" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Touches" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Crosses" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Within" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Contains" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Overlaps" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "BBOX" }));
    end("fes:SpatialOperators");
    end("fes:Spatial_Capabilities");
    start("fes:Temporal_Capabilities");
    start("fes:TemporalOperands");
    element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:TimeInstant" }));
    element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:TimePeriod" }));
    //element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:validTime" }));
    //element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:timePosition" }));
    //element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:timeInterval" }));
    //element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:duration" }));
    end("fes:TemporalOperands");
    start("fes:TemporalOperators");
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "After" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "Before" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "Begins" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "BegunBy" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "TContains" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "During" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "TEquals" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "TOverlaps" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "Meets" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "OverlappedBy" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "MetBy" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "EndedBy" }));
    end("fes:TemporalOperators");
    end("fes:Temporal_Capabilities");
    List<Schema> typeMappingProfiles = org.geotools.gml3.v3_2.GML.getInstance().getAllTypeMappingProfiles();
    start("fes:Functions");
    for (FunctionName fn : getAvailableFunctionNames()) {
        start("fes:Function", attributes(new String[] { "name", fn.getName() }));
        //figure out return type
        Name returnType = lookupTypeName(typeMappingProfiles, fn.getReturn());
        String prefix = getNamespaceSupport().getPrefix(returnType.getNamespaceURI());
        if (prefix != null) {
            element("fes:Returns", prefix + ":" + returnType.getLocalPart());
        } else {
            LOGGER.warning(String.format("Unable to map function return type to QName for " + "function %s. No namespace mapping for %s.", fn.getName(), returnType.getNamespaceURI()));
        }
        if (!fn.getArgumentNames().isEmpty()) {
            start("fes:Arguments");
            for (Parameter<?> arg : fn.getArguments()) {
                start("fes:Argument", attributes(new String[] { "name", arg.getName() }));
                Name argType = lookupTypeName(typeMappingProfiles, arg);
                prefix = getNamespaceSupport().getPrefix(argType.getNamespaceURI());
                if (prefix != null) {
                    element("fes:Type", prefix + ":" + argType.getLocalPart());
                } else {
                    LOGGER.warning(String.format("Unable to map function argument type to QName for " + "function %s. No namespace mapping for %s.", arg.getName(), argType.getNamespaceURI()));
                }
                end("fes:Argument");
            }
            end("fes:Arguments");
        }
        end("fes:Function");
    }
    end("fes:Functions");
    //extended operators
    //TODO: eventually use all extended operator vactories... but for now just use
    // the WFS one because it gives some custom api for namespace stuff...
    //               WFSExtendedOperatorFactory wfsExtOpsFactory = new WFSExtendedOperatorFactory();
    //               if (!wfsExtOpsFactory.getFunctionNames().isEmpty()) {
    //                   start("fes:ExtendedCapabilities");
    //
    //                   //declare the necessary namespaces
    //                   NamespaceSupport extOpNamespaces = wfsExtOpsFactory.getNamespaces(); 
    //                   Enumeration prefixes = extOpNamespaces.getDeclaredPrefixes();
    //                   
    //                   List<String> xmlns = new ArrayList();
    //                   while(prefixes.hasMoreElements()) {
    //                       String prefix = (String) prefixes.nextElement();
    //                       if ("".equals(prefix) || "xml".equals(prefix)) {
    //                           continue;
    //                       }
    //                       xmlns.add("xmlns:" + prefix);
    //                       xmlns.add(extOpNamespaces.getURI(prefix));
    //                   }
    //                   
    //                   start("fes:AdditionalOperators", attributes(xmlns.toArray(new String[xmlns.size()])));
    //                   for (Name extOp : wfsExtOpsFactory.getOperatorNames()) {
    //                       String prefix = extOpNamespaces.getPrefix(extOp.getNamespaceURI());
    //                       String qName = prefix != null ? prefix + ":" + extOp.getLocalPart() : 
    //                           extOp.getLocalPart();
    //
    //                       element("fes:Operator", null, attributes(new String[]{"name", qName}));
    //                   }
    //                   end("fes:AdditionalOperators");
    //                   end("fes:ExtendedCapabilities");
    //               }
    end("fes:Filter_Capabilities");
}
Example 5
Project: geotools-tike-master  File: GML.java View source code
@Override
protected Schema buildTypeMappingProfile(Schema typeSchema) {
    // set with guaranteed iteration order, so that we can put deprecated elements only
    // after the ones that replaced them
    Set profile = new LinkedHashSet();
    //basic
    profile.add(name(GML.MeasureType));
    //geomtetries
    profile.add(name(GML.PointPropertyType));
    profile.add(name(GML.MultiPointPropertyType));
    profile.add(name(GML.LineStringPropertyType));
    profile.add(name(GML.MultiLineStringPropertyType));
    profile.add(name(GML.CurvePropertyType));
    profile.add(name(GML.MultiCurvePropertyType));
    profile.add(name(GML.SurfacePropertyType));
    profile.add(name(GML.MultiSurfacePropertyType));
    // register polygon and multipolygon only after surface, the iteration order
    // will make sure surface is found before in any encoding attempt, this way we
    // are still able to handle polygons, but we don't use them by default
    profile.add(name(GML.PolygonPropertyType));
    profile.add(name(GML.MultiPolygonPropertyType));
    //profile.add( new NameImpl(  GML.NAMESPACE, GML.AbstractGeometryType ) );
    profile.add(name(GML.GeometryPropertyType));
    profile.add(name(GML.MultiGeometryPropertyType));
    return typeSchema.profile(profile);
}
Example 6
Project: geotools-2.7.x-master  File: GML.java View source code
@Override
public Schema buildTypeMappingProfile(Schema typeSchema) {
    // set with guaranteed iteration order, so that we can put deprecated elements only
    // after the ones that replaced them
    Set profile = new LinkedHashSet();
    //basic
    profile.add(name(GML.MeasureType));
    //geomtetries
    profile.add(name(GML.PointPropertyType));
    profile.add(name(GML.MultiPointPropertyType));
    profile.add(name(GML.LineStringPropertyType));
    profile.add(name(GML.MultiLineStringPropertyType));
    profile.add(name(GML.CurvePropertyType));
    profile.add(name(GML.MultiCurvePropertyType));
    profile.add(name(GML.SurfacePropertyType));
    profile.add(name(GML.MultiSurfacePropertyType));
    // register polygon and multipolygon only after surface, the iteration order
    // will make sure surface is found before in any encoding attempt, this way we
    // are still able to handle polygons, but we don't use them by default
    profile.add(name(GML.PolygonPropertyType));
    profile.add(name(GML.MultiPolygonPropertyType));
    //profile.add( new NameImpl(  GML.NAMESPACE, GML.AbstractGeometryType ) );
    profile.add(name(GML.GeometryPropertyType));
    profile.add(name(GML.MultiGeometryPropertyType));
    return typeSchema.profile(profile);
}
Example 7
Project: geotools-old-master  File: GML.java View source code
@Override
public Schema buildTypeMappingProfile(Schema typeSchema) {
    // set with guaranteed iteration order, so that we can put deprecated elements only
    // after the ones that replaced them
    Set profile = new LinkedHashSet();
    //basic
    profile.add(name(GML.MeasureType));
    //geomtetries
    profile.add(name(GML.PointPropertyType));
    profile.add(name(GML.MultiPointPropertyType));
    profile.add(name(GML.LineStringPropertyType));
    profile.add(name(GML.MultiLineStringPropertyType));
    profile.add(name(GML.CurvePropertyType));
    profile.add(name(GML.MultiCurvePropertyType));
    profile.add(name(GML.SurfacePropertyType));
    profile.add(name(GML.MultiSurfacePropertyType));
    // register polygon and multipolygon only after surface, the iteration order
    // will make sure surface is found before in any encoding attempt, this way we
    // are still able to handle polygons, but we don't use them by default
    profile.add(name(GML.PolygonPropertyType));
    profile.add(name(GML.MultiPolygonPropertyType));
    //profile.add( new NameImpl(  GML.NAMESPACE, GML.AbstractGeometryType ) );
    profile.add(name(GML.GeometryPropertyType));
    profile.add(name(GML.MultiGeometryPropertyType));
    return typeSchema.profile(profile);
}
Example 8
Project: geoserver_trunk-master  File: CapabilitiesTransformer.java View source code
void filterCapabilities() {
    start("fes:Filter_Capabilities");
    start("fes:Conformance");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsQuery" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsAdHocQuery" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsFunctions" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsMinStandardFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsStandardFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "FALSE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsMinSpatialFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsSpatialFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "FALSE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsMinTemporalFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsTemporalFilter" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "TRUE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsVersionNav" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "FALSE");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsSorting" }));
    start("ows:AllowedValues");
    element("ows:Value", "ASC");
    element("ows:Value", "DESC");
    end("ows:AllowedValues");
    element("ows:DefaultValue", "ASC");
    end("fes:Constraint");
    start("fes:Constraint", attributes(new String[] { "name", "ImplementsExtendedOperators" }));
    element("ows:NoValues", null);
    element("ows:DefaultValue", "FALSE");
    end("fes:Constraint");
    end("fes:Conformance");
    start("fes:Id_Capabilities");
    element("fes:ResourceIdentifier", null, attributes(new String[] { "name", "fes:ResourceId" }));
    end("fes:Id_Capabilities");
    start("fes:Scalar_Capabilities");
    element("fes:LogicalOperators", null);
    start("fes:ComparisonOperators");
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsLessThan" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsGreaterThan" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsLessThanOrEqualTo" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsGreaterThanOrEqualTo" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsEqualTo" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsNotEqualTo" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsLike" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsBetween" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsNull" }));
    element("fes:ComparisonOperator", null, attributes(new String[] { "name", "PropertyIsNil" }));
    end("fes:ComparisonOperators");
    end("fes:Scalar_Capabilities");
    start("fes:Spatial_Capabilities");
    start("fes:GeometryOperands");
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:Envelope" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:Point" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:MultiPoint" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:LineString" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:MultiLineString" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:Polygon" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:MultiPolygon" }));
    element("fes:GeometryOperand", null, attributes(new String[] { "name", "gml:MultiGeometry" }));
    end("fes:GeometryOperands");
    start("fes:SpatialOperators");
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Disjoint" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Equals" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "DWithin" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Beyond" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Intersects" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Touches" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Crosses" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Contains" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "Overlaps" }));
    element("fes:SpatialOperator", null, attributes(new String[] { "name", "BBOX" }));
    end("fes:SpatialOperators");
    end("fes:Spatial_Capabilities");
    start("fes:Temporal_Capabilities");
    start("fes:TemporalOperands");
    element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:TimeInstant" }));
    element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:TimePeriod" }));
    //element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:validTime" }));
    //element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:timePosition" }));
    //element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:timeInterval" }));
    //element("fes:TemporalOperand", null, attributes(new String[] { "name", "gml:duration" }));
    end("fes:TemporalOperands");
    start("fes:TemporalOperators");
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "After" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "Before" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "Begins" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "BegunBy" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "TContains" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "During" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "TEquals" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "TOverlaps" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "Meets" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "OverlappedBy" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "MetBy" }));
    element("fes:TemporalOperator", null, attributes(new String[] { "name", "EndedBy" }));
    end("fes:TemporalOperators");
    end("fes:Temporal_Capabilities");
    List<Schema> typeMappingProfiles = org.geotools.gml3.v3_2.GML.getInstance().getAllTypeMappingProfiles();
    start("fes:Functions");
    for (FunctionName fn : getAvailableFunctionNames()) {
        start("fes:Function", attributes(new String[] { "name", fn.getName() }));
        //figure out return type
        Name returnType = lookupTypeName(typeMappingProfiles, fn.getReturn());
        String prefix = getNamespaceSupport().getPrefix(returnType.getNamespaceURI());
        if (prefix != null) {
            element("fes:Returns", prefix + ":" + returnType.getLocalPart());
        } else {
            LOGGER.warning(String.format("Unable to map function return type to QName for " + "function %s. No namespace mapping for %s.", fn.getName(), returnType.getNamespaceURI()));
        }
        if (!fn.getArgumentNames().isEmpty()) {
            start("fes:Arguments");
            for (Parameter<?> arg : fn.getArguments()) {
                start("fes:Argument", attributes(new String[] { "name", arg.getName() }));
                Name argType = lookupTypeName(typeMappingProfiles, arg);
                prefix = getNamespaceSupport().getPrefix(argType.getNamespaceURI());
                if (prefix != null) {
                    element("fes:Type", prefix + ":" + argType.getLocalPart());
                } else {
                    LOGGER.warning(String.format("Unable to map function argument type to QName for " + "function %s. No namespace mapping for %s.", arg.getName(), argType.getNamespaceURI()));
                }
                end("fes:Argument");
            }
            end("fes:Arguments");
        }
        end("fes:Function");
    }
    end("fes:Functions");
    //extended operators
    //TODO: eventually use all extended operator vactories... but for now just use
    // the WFS one because it gives some custom api for namespace stuff...
    //               WFSExtendedOperatorFactory wfsExtOpsFactory = new WFSExtendedOperatorFactory();
    //               if (!wfsExtOpsFactory.getFunctionNames().isEmpty()) {
    //                   start("fes:ExtendedCapabilities");
    //
    //                   //declare the necessary namespaces
    //                   NamespaceSupport extOpNamespaces = wfsExtOpsFactory.getNamespaces(); 
    //                   Enumeration prefixes = extOpNamespaces.getDeclaredPrefixes();
    //                   
    //                   List<String> xmlns = new ArrayList();
    //                   while(prefixes.hasMoreElements()) {
    //                       String prefix = (String) prefixes.nextElement();
    //                       if ("".equals(prefix) || "xml".equals(prefix)) {
    //                           continue;
    //                       }
    //                       xmlns.add("xmlns:" + prefix);
    //                       xmlns.add(extOpNamespaces.getURI(prefix));
    //                   }
    //                   
    //                   start("fes:AdditionalOperators", attributes(xmlns.toArray(new String[xmlns.size()])));
    //                   for (Name extOp : wfsExtOpsFactory.getOperatorNames()) {
    //                       String prefix = extOpNamespaces.getPrefix(extOp.getNamespaceURI());
    //                       String qName = prefix != null ? prefix + ":" + extOp.getLocalPart() : 
    //                           extOp.getLocalPart();
    //
    //                       element("fes:Operator", null, attributes(new String[]{"name", qName}));
    //                   }
    //                   end("fes:AdditionalOperators");
    //                   end("fes:ExtendedCapabilities");
    //               }
    end("fes:Filter_Capabilities");
}