private static RDFNode getDefaultValueForType(Resource cls, Property predicate, Set<Resource> reached) {
		reached.add(cls);
		StmtIterator it = cls.listProperties(SPIN.rule);
		while(it.hasNext()) {
			Statement s = it.nextStatement();
			if(s.getObject().isResource()) {
				Resource templateCall = s.getResource();
				if(templateCall.hasProperty(RDF.type, SPL.InferDefaultValue)) {
					if(templateCall.hasProperty(SPL.predicate, predicate)) {
						Statement v = templateCall.getProperty(SPL.defaultValue);
						if(v != null) {
							it.close();
							return v.getObject();
						}
					}
				}
			}
		}
		
		for(Resource superClass : JenaUtil.getSuperClasses(cls)) {
			if(!reached.contains(superClass)) {
				RDFNode value = getDefaultValueForType(superClass, predicate, reached);
				if(value != null) {
					return value;
				}
			}
		}
		
		return null;
	}