/** * Returns the rdf lists of which the specified <code>GraphNode</code> is * an element of. Sublists of other lists are not returned. * * @param element * @return */ public static Set<RdfList> findContainingLists(GraphNode element) { Set<GraphNode> listNodes = findContainingListNodes(element); if (listNodes.isEmpty()) { return null; } Set<RdfList> rdfLists = new HashSet<RdfList>(); for (Iterator<GraphNode> it = listNodes.iterator(); it.hasNext();) { GraphNode listNode = it.next(); rdfLists.add(new RdfList(listNode)); } return rdfLists; }
/** * Returns the rdf lists of which the specified <code>GraphNode</code> is * an element of. Sublists of other lists are not returned. * * @param element * @return */ public static Set<RdfList> findContainingLists(GraphNode element) { Set<GraphNode> listNodes = findContainingListNodes(element); if (listNodes.isEmpty()) { return null; } Set<RdfList> rdfLists = new HashSet<RdfList>(); for (Iterator<GraphNode> it = listNodes.iterator(); it.hasNext();) { GraphNode listNode = it.next(); rdfLists.add(new RdfList(listNode)); } return rdfLists; }