code: private ImmutableList<TargetAtom> prepareTargetQuery(MapItem predicateSubjectMap, List<MapItem> predicateObjectMapsList) {
  		// Create the body of the CQ
  		ImmutableList.Builder<TargetAtom> bodyBuilder = ImmutableList.builder();
  
  		// Store concept in the body, if any
  		ImmutableTerm subjectTerm = createSubjectTerm(predicateSubjectMap);
  		if (!predicateSubjectMap.getPredicateIRI().equals(OWL.THING)) {
  			TargetAtom concept = targetAtomFactory.getTripleTargetAtom(subjectTerm, predicateSubjectMap.getPredicateIRI());
  			bodyBuilder.add(concept);
  		}
  
  		// Store attributes and roles in the body
  		//List<Term> distinguishVariables = new ArrayList<Term>();
  		for (MapItem predicateObjectMap : predicateObjectMapsList) {
  			if (predicateObjectMap.isObjectMap()) { // if an attribute
  				ImmutableTerm objectTerm = createObjectTerm(getColumnName(predicateObjectMap), predicateObjectMap.getDataType());
  				TargetAtom attribute = targetAtomFactory.getTripleTargetAtom(subjectTerm, predicateObjectMap.getPredicateIRI(), objectTerm);
  				bodyBuilder.add(attribute);
  				//distinguishVariables.add(objectTerm);
  			} else if (predicateObjectMap.isRefObjectMap()) { // if a role
  				ImmutableFunctionalTerm objectRefTerm = createRefObjectTerm(predicateObjectMap);
  				TargetAtom role = targetAtomFactory.getTripleTargetAtom(subjectTerm, predicateObjectMap.getPredicateIRI(), objectRefTerm);
  				bodyBuilder.add(role);
  			}
  		}
  		// Create the head
  		//int arity = distinguishVariables.size();
  		//Function head = termFactory.getFunction(termFactory.getTermType(OBDALibConstants.QUERY_HEAD, arity), distinguishVariables);
  
  		// Create and return the conjunctive query
  		return bodyBuilder.build();
  	}
docs: GEN-LAST:event_cmdCreateMappingActionPerformed