code: private static Set<String> getRelationLevelSet(SDocumentGraph graph, String namespace,
  			Class<? extends SRelation> type) {
  		Set<String> result = new TreeSet<>();
  
  		if (graph != null) {
  			List<? extends SRelation> edges = null;
  			if (type == SDominanceRelation.class) {
  				edges = graph.getDominanceRelations();
  			} else if (type == SPointingRelation.class) {
  				edges = graph.getPointingRelations();
  			} else if (type == SSpanningRelation.class) {
  				edges = graph.getSpanningRelations();
  			}
  
  			if (edges != null) {
  				for (SRelation<?, ?> edge : edges) {
  					Set<SLayer> layers = edge.getLayers();
  					for (SLayer layer : layers) {
  						if (namespace == null || namespace.equals(layer.getName())) {
  							for (SAnnotation anno : edge.getAnnotations()) {
  								result.add(anno.getQName());
  							}
  							// we got all annotations of this edge, jump to next edge
  							break;
  						} // end if namespace equals layer name
  					} // end for each layer
  				} // end for each edge
  			}
  		}
  		return result;
  	}
docs: Get the qualified name of all annotations belonging to relations having a
  specific namespace.
  
  @param graph
  The graph.
  @param namespace
  The namespace of the relation (not the annotation) to search for.
  If namespace is null all namespaces will be considered.
  @param type
  Which type of relation to include
  @return