sparqlGraphLibrary/src/main/java/com/ge/research/semtk/ontologyTools/PathExplorer.java
private boolean addDataPropReturn(NodeGroup ng, ArrayList<String> propRetList) throws Exception {
	
		// TODO: does not attempt to add the prop's class if it's missing
		
		for (String propUri : propRetList) {
			boolean found = false;
			for (Node n : ng.getNodeList()) {
				PropertyItem propItem = n.getPropertyByURIRelation(propUri);
				if (propItem != null) {
					ng.setIsReturned(propItem, true);
					propItem.setOptMinus(PropertyItem.OPT_MINUS_OPTIONAL);
					found = true;
				}
			}
			if (!found) {
				LocalLogger.logToStdErr("...failed to add prop: " + propUri);
				return false;
			}
		}
		return true;
	}
/**
	 * Adds property returns to every class containing them
	 * @param ng
	 * @param propRetList
	 * @return false if any property could not be found
	 */
Adds property returns to every class containing them
@param ng
@param propRetList
@return false if any property could not be found
Adds property returns to every class containing them @param ng @param propRetList @return false if any property could not be found
private boolean addDataPropReturn(NodeGroup ng, ArrayList<String> propRetList) throws Exception {
		for (String propUri : propRetList) {
			boolean found = false;
			for (Node n : ng.getNodeList()) {
				PropertyItem propItem = n.getPropertyByURIRelation(propUri);
				if (propItem != null) {
					ng.setIsReturned(propItem, true);
					propItem.setOptMinus(PropertyItem.OPT_MINUS_OPTIONAL);
					found = true;
				}
			}
			if (!found) {
				LocalLogger.logToStdErr("...failed to add prop: " + propUri);
				return false;
			}
		}
		return true;
	}
private boolean addDataPropReturn ( NodeGroup ng , ArrayList < String > propRetList ) throws Exception { for ( String propUri : propRetList ) { boolean found = false ; for ( Node n : ng . getNodeList ( ) ) { PropertyItem propItem = n . getPropertyByURIRelation ( propUri ) ; if ( propItem != null ) { ng . setIsReturned ( propItem , true ) ; propItem . setOptMinus ( PropertyItem . OPT_MINUS_OPTIONAL ) ; found = true ; } } if ( ! found ) { LocalLogger . logToStdErr ( "...failed to add prop: " + propUri ) ; return false ; } } return true ; }
Adds property returns to every class containing them
 @param ng
 @param propRetList
 @return false if any property could not be found
Adds property returns to every class containing them @param ng @param propRetList @return false if any property could not be found
// TODO: does not attempt to add the prop's class if it's missing