code: private void validate() throws Exception {
  		final String text = parent.getText().trim();
  		if (text.isEmpty() || text.length() == 1) {
  			String msg = String.format("Empty query");
  			invalid = true;
  			throw new Exception(msg);
  		}
  
  		TargetQueryParser textParser = new TurtleOBDASQLParser(
  		        apic.getMutablePrefixManager().getPrefixMap(),
                  apic.getTermFactory(),
  				apic.getTargetAtomFactory(),
  				apic.getRdfFactory());
  		ImmutableList<TargetAtom> query = textParser.parse(text);
  
  		if (query == null) {
  			invalid = true;
  			throw parsingException;
  		}
  		List<IRI> invalidPredicates = TargetQueryValidator.validate(query, apic.getCurrentVocabulary());
  		if (!invalidPredicates.isEmpty()) {
  			String invalidList = "";
  			for (IRI predicateIri : invalidPredicates) {
  				invalidList += "- " + predicateIri + "\n";
  			}
  			String msg = String.format("ERROR: The below list of predicates is unknown by the ontology: \n %s Note: null indicates an unknown prefix.", invalidList);
  			invalid = true;
  			throw new Exception(msg);
  		}
  		invalid = false;
  	}
docs: *
  Checks if the query is valid. If so, notifies listeners that the query
  has been validated.
  
  @throws Exception