src/main/java/org/vivoweb/harvester/operations/DeleteProfile.java
/**
	 * @param cwid The unique identifier to search for in ED
	 * @return whether the person is active in ED or not
	 * This function checks for a supplied cwid whether the person is active in ED or not
	 */
@param cwid The unique identifier to search for in ED
@return whether the person is active in ED or not
This function checks for a supplied cwid whether the person is active in ED or not
@param cwid The unique identifier to search for in ED @return whether the person is active in ED or not This function checks for a supplied cwid whether the person is active in ED or not
public boolean checkForInActivePeopleEd(String cwid) {
		boolean isActive = false;
		LDAPConnection connection = this.lcf.getConnectionfromPool();
		if(connection != null) {
			this.lcf.returnConnectionToPool(connection);
			List<SearchResultEntry> results = this.lcf.searchWithBaseDN("(&(objectClass=eduPerson)(weillCornellEduCWID=" + cwid + "))", "ou=people,dc=weill,dc=cornell,dc=edu");
			if (results.size() == 1) {
				SearchResultEntry entry = results.get(0);
				if(entry.getAttributeValue("weillCornellEduCWID") != null) {
					if(entry.getAttributeValues("weillCornellEduPersonTypeCode") != null) {
						String personType[] = new String[entry.getAttributeValues("weillCornellEduPersonTypeCode").length];
						personType = entry.getAttributeValues("weillCornellEduPersonTypeCode");
						List<String> ptypes = Arrays.asList(personType);
						if(ptypes.contains("academic")) 
							isActive = true;
						else
							isActive = false;
					}
					else
						isActive = false;
					if(entry.getAttributeValue("sn") !=null ) 
						this.familyName = StringEscapeUtils.escapeJava(entry.getAttributeValue("sn"));
					if(entry.getAttributeValue("givenName") !=null )
						this.givenName = StringEscapeUtils.escapeJava(entry.getAttributeValue("givenName"));
					if(entry.getAttributeValue("weillCornellEduMiddleName") != null)
						this.middleName = " " + StringEscapeUtils.escapeJava(entry.getAttributeValue("weillCornellEduMiddleName")) + " ";
					else
						this.middleName= " ";
				}
				else
					isActive = false;
			}
			else
				isActive = false;
			if(isActive==false) {
				if(this.givenName == null && this.familyName == null)
				getNamesFromVivo(cwid);
			}
		} else 
			isActive = true;
		return isActive;
	}
public boolean checkForInActivePeopleEd ( String cwid ) { boolean isActive = false ; LDAPConnection connection = this . lcf . getConnectionfromPool ( ) ; if ( connection != null ) { this . lcf . returnConnectionToPool ( connection ) ; List < SearchResultEntry > results = this . lcf . searchWithBaseDN ( "(&(objectClass=eduPerson)(weillCornellEduCWID=" + cwid + "))" , "ou=people,dc=weill,dc=cornell,dc=edu" ) ; if ( results . size ( ) == 1 ) { SearchResultEntry entry = results . get ( 0 ) ; if ( entry . getAttributeValue ( "weillCornellEduCWID" ) != null ) { if ( entry . getAttributeValues ( "weillCornellEduPersonTypeCode" ) != null ) { String personType [ ] = new String [ entry . getAttributeValues ( "weillCornellEduPersonTypeCode" ) . length ] ; personType = entry . getAttributeValues ( "weillCornellEduPersonTypeCode" ) ; List < String > ptypes = Arrays . asList ( personType ) ; if ( ptypes . contains ( "academic" ) ) isActive = true ; else isActive = false ; } else isActive = false ; if ( entry . getAttributeValue ( "sn" ) != null ) this . familyName = StringEscapeUtils . escapeJava ( entry . getAttributeValue ( "sn" ) ) ; if ( entry . getAttributeValue ( "givenName" ) != null ) this . givenName = StringEscapeUtils . escapeJava ( entry . getAttributeValue ( "givenName" ) ) ; if ( entry . getAttributeValue ( "weillCornellEduMiddleName" ) != null ) this . middleName = " " + StringEscapeUtils . escapeJava ( entry . getAttributeValue ( "weillCornellEduMiddleName" ) ) + " " ; else this . middleName = " " ; } else isActive = false ; } else isActive = false ; if ( isActive == false ) { if ( this . givenName == null && this . familyName == null ) getNamesFromVivo ( cwid ) ; } } else isActive = true ; return isActive ; }
@param cwid The unique identifier to search for in ED
 @return whether the person is active in ED or not
 This function checks for a supplied cwid whether the person is active in ED or not
@param cwid The unique identifier to search for in ED @return whether the person is active in ED or not This function checks for a supplied cwid whether the person is active in ED or not
//logger.info(entry.toLDIFString());