// walk through selected operators...
for (final T op : this.selectedOperatorsList) {
// if selected operator is RDFTerm and more than one operator was
// selected...
if (op instanceof RDFTerm && this.selectedOperatorsList.size() > 1) {
final RDFTerm rdf1 = (RDFTerm) op;
// walk through all selected operators to find children of the
// selected RDFTerm...
for (final T op2 : this.selectedOperatorsList) {
// if a child of the selected RDFTerm is selected, too...
if (rdf1.getSucceedingOperators().contains(
new OperatorIDTuple<T>(op2, -1))) {
final RDFTerm rdf2 = (RDFTerm) op2;
final HashSet<T> annotationsRDF1 = this.selectedAnnotationList
.get(rdf1);
// if the predicates was also selected...
if (annotationsRDF1 != null
&& annotationsRDF1.contains(rdf2)) {
copiedList.remove(rdf1);
copiedList.remove(rdf2);
// get predicates between these two RDFTerms...
final LinkedList<Item> predicates = rdf1
.getPredicates(rdf2);
for (final VisualGraph<T> visualGraph : this.visualGraphs) {
final GraphWrapperEditable opGW = visualGraph
.createGraphWrapper(op);
// walk through predicates...
for (final Item pred : predicates) {
copiedText
.append(opGW.serializeOperator()
+ " " + pred.toString()
+ " "
+ rdf2.serializeOperator()
+ " .\n");
}
}
}
}