public boolean isValid() throws Exception {
		int virtualGraphs=0;
		int defaultGraphs=0;
		for (NamedGraph g:graphs){
			if (g.getDepth()==-1){
				virtualGraphs++;
				if (virtualGraphs>1){
					throw new Exception("Multiple virtual graphs");
				}
			}
			if (g.getName().length()==0){
				defaultGraphs++;
				if (defaultGraphs>1){
					throw new Exception("Multiple default/nameless graphs");
				}
			}
			if (!g.isValid()){
				return false;
			}
		}
		
		return true;
	}