public static ISet switchQ(Index<Node> index, IValueFactory vf, Type type, TypeStore ts) throws GraphDbMappingException {
		Set<IValue> results = new HashSet<IValue>();
		for (Node switchRefNode : index.get("node", "switch")) {
			Node switchHead = getHead(switchRefNode);
			Node switchBodyRefNode = getNextEle(switchHead);
			if (switchBodyRefNode.hasRelationship(RelTypes.HEAD, Direction.OUTGOING)) {
				Node switchBodyHead = getHead(switchBodyRefNode);
				Node statement = switchBodyHead;
				boolean hasDefaultCase = false;
				while (statement.hasRelationship(RelTypes.TO, Direction.OUTGOING)) {
					if(statement.getProperty("node").toString().equals("defaultCase")) {
						hasDefaultCase = true;
						break;
					}
					statement = getNextEle(statement);
				}
				if (!hasDefaultCase)
					results.add(type.accept(new GraphDbValueRetrievalVisitor(switchRefNode, vf, ts)));
			}
			else
				results.add(type.accept(new GraphDbValueRetrievalVisitor(switchRefNode, vf, ts)));
		}
		return vf.set(results.toArray(new IValue[results.size()]));
	}