}
private static void registerGeoXACMLBaseFunctions() {
FunctionFactoryProxy factoryProxy = StandardFunctionFactory.getNewFactoryProxy();
FunctionFactory factory = factoryProxy.getTargetFactory();
// FunctionFactory factory = FunctionFactory.getTargetInstance();
// add wildcard functions
for (Function wildCardFunction : new WildCardFunctionCluster().getSupportedFunctions()) {
factory.addFunction(wildCardFunction);
}
factory.addFunction(new GeometryEquals());
factory.addFunction(new GeometryDisjoint());
factory.addFunction(new GeometryTouches());
factory.addFunction(new GeometryCrosses());
factory.addFunction(new GeometryWithin());
factory.addFunction(new GeometryContains());
factory.addFunction(new GeometryOverlaps());
factory.addFunction(new GeometryIntersects());
factory.addFunction(new GeometryIsClosed());
factory.addFunction(new GeometryIsValid());
factory.addFunction(new GeometryIsSimple());
factory.addFunction(new GeometryArea());
factory.addFunction(new GeometryDistance());
factory.addFunction(new GeometryIsWithinDistance());
factory.addFunction(new GeometryLength());
factory.addFunction(new GeometryBuffer());
factory.addFunction(new GeometryUnion());
factory.addFunction(new GeometryIntersection());
factory.addFunction(new GeometryDifference());
factory.addFunction(new GeometrySymDifference());
factory.addFunction(new GeometryBoundary());
factory.addFunction(new GeometryCentroid());
factory.addFunction(new GeometryConvexHull());
factory.addFunction(new ConvertToMetre());
factory.addFunction(new ConvertToSquareMetre());
String bagPrefix = "urn:ogc:def:function:geoxacml:1.0:geometry";
String functionName;
functionName = bagPrefix + BagFunction.NAME_BASE_ONE_AND_ONLY;
factory.addFunction(BagFunction.getOneAndOnlyInstance(functionName,
GeometryAttribute.identifier));
functionName = bagPrefix + BagFunction.NAME_BASE_IS_IN;
factory
.addFunction(BagFunction
.getIsInInstance(functionName, GeometryAttribute.identifier));
functionName = bagPrefix + BagFunction.NAME_BASE_BAG_SIZE;
factory.addFunction(BagFunction.getBagSizeInstance(functionName,
GeometryAttribute.identifier));
functionName = bagPrefix + BagFunction.NAME_BASE_BAG;
factory.addFunction(BagFunction.getBagInstance(functionName, GeometryAttribute.identifier));
String setPrefix = "urn:ogc:def:function:geoxacml:1.0:geometry";
functionName = setPrefix + SetFunction.NAME_BASE_AT_LEAST_ONE_MEMBER_OF;
factory.addFunction(SetFunction.getAtLeastOneInstance(functionName,
GeometryAttribute.identifier));
functionName = setPrefix + SetFunction.NAME_BASE_SET_EQUALS;
factory.addFunction(SetFunction.getSetEqualsInstance(functionName,
GeometryAttribute.identifier));
setPrefix = "urn:ogc:def:function:geoxacml:1.0:geometry-bag";
functionName = setPrefix + SetFunction.NAME_BASE_INTERSECTION;
factory.addFunction(SetFunction.getIntersectionInstance(functionName,
GeometryAttribute.identifier));
functionName = setPrefix + SetFunction.NAME_BASE_SUBSET;
factory.addFunction(SetFunction.getSubsetInstance(functionName,
GeometryAttribute.identifier));
functionName = setPrefix + SetFunction.NAME_BASE_UNION;
factory.addFunction(SetFunction
.getUnionInstance(functionName, GeometryAttribute.identifier));
FunctionFactory.setDefaultFactory(factoryProxy);
}