private static boolean isMagicProperty(PropertyFunctionRegistry registry, Triple pfTriple) { if (!pfTriple.getPredicate().isURI()) return false; if (registry.manages(pfTriple.getPredicate().getURI())) return true; return false; }
public static void init() { if (initialized) return; synchronized (lock) { if (initialized) { JenaSystem.logLifecycle("SpatialQuery.init - skip"); return; } initialized = true; JenaSystem.logLifecycle("SpatialQuery.init - start"); SpatialAssembler.init(); SystemInfo sysInfo = new SystemInfo(IRI, PATH, VERSION, BUILD_DATE); SystemARQ.registerSubSystem(sysInfo); PropertyFunctionRegistry.get() .put( "http://jena.apache.org/spatial#withinCircle", new PropertyFunctionFactory() { @Override public PropertyFunction create(String uri) { return new IsWithinCirclePF(); } }); PropertyFunctionRegistry.get() .put( "http://jena.apache.org/spatial#nearby", new PropertyFunctionFactory() { @Override public PropertyFunction create(String uri) { return new IsNearByPF(); } }); PropertyFunctionRegistry.get() .put( "http://jena.apache.org/spatial#withinBox", new PropertyFunctionFactory() { @Override public PropertyFunction create(String uri) { return new IsWithinBoxPF(); } }); PropertyFunctionRegistry.get() .put( "http://jena.apache.org/spatial#intersectBox", new PropertyFunctionFactory() { @Override public PropertyFunction create(String uri) { return new IntersectsBoxPF(); } }); PropertyFunctionRegistry.get() .put( "http://jena.apache.org/spatial#north", new PropertyFunctionFactory() { @Override public PropertyFunction create(String uri) { return new NorthPF(); } }); PropertyFunctionRegistry.get() .put( "http://jena.apache.org/spatial#south", new PropertyFunctionFactory() { @Override public PropertyFunction create(String uri) { return new SouthPF(); } }); PropertyFunctionRegistry.get() .put( "http://jena.apache.org/spatial#east", new PropertyFunctionFactory() { @Override public PropertyFunction create(String uri) { return new EastPF(); } }); PropertyFunctionRegistry.get() .put( "http://jena.apache.org/spatial#west", new PropertyFunctionFactory() { @Override public PropertyFunction create(String uri) { return new WestPF(); } }); JenaSystem.logLifecycle("SpatialQuery.init - finish"); } }