src/main/java/org/vivoweb/harvester/ingest/AcademicFetchFromED.java
/**
		 * This function will sync all the personTypeCodes from ED with VIVO rdf types
		 * @param pb The PeopleBean conatining all people information from ED
		 */
This function will sync all the personTypeCodes from ED with VIVO rdf types
@param pb The PeopleBean conatining all people information from ED
This function will sync all the personTypeCodes from ED with VIVO rdf types @param pb The PeopleBean conatining all people information from ED
private void syncCOIData(PeopleBean pb) {
			log.info("Syncing VIVO COI data from InfoED with VIVO for " + pb.getCwid());
			if(this.vivoCoiMap.containsKey(pb.getCwid())) {
				StringBuilder sb = new StringBuilder();
				sb.append("WITH <http://vitro.mannlib.cornell.edu/a/graph/wcmcPeople> \n");
				sb.append("DELETE { \n");
				sb.append("<" + this.vivoNamespace + "cwid-" + pb.getCwid().trim() + "> <http://weill.cornell.edu/vivo/ontology/wcmc#externalRelationships> ?o .\n");
				sb.append("} \n");
				sb.append("INSERT { \n");
				sb.append("<" + this.vivoNamespace + "cwid-" + pb.getCwid().trim() + "> <http://weill.cornell.edu/vivo/ontology/wcmc#externalRelationships> \"" + this.vivoCoiMap.get(pb.getCwid()) + "\" . \n");
				sb.append("} \n");
				sb.append("WHERE { \n");
				sb.append("OPTIONAL {<" + this.vivoNamespace + "cwid-" + pb.getCwid().trim() + "> <http://weill.cornell.edu/vivo/ontology/wcmc#externalRelationships> ?o .}\n");
				sb.append("}");
				log.info(sb.toString());
				if(ingestType.equals(IngestType.VIVO_API.toString())) {
					try {
						log.info(this.vivoClient.vivoUpdateApi(sb.toString()));
					} catch(Exception e) {
						log.error("Api Exception", e);
					}
				} else if(ingestType.equals(IngestType.SDB_DIRECT.toString())){
					TDBJenaConnect vivoJena = this.tcf.getConnectionfromPool("dataSet");
					try {
						runTDBSparqlUpdateTemplate(sb.toString(), vivoJena);
					} catch(IOException e) {
						log.error("IOException: ",e);
					}
					if(vivoJena!= null)
						this.tcf.returnConnectionToPool(vivoJena, "dataSet");
				}
			} else {
				log.info("No external relationships exist for " + pb.getCwid());
			}
		}
private void syncCOIData ( PeopleBean pb ) { log . info ( "Syncing VIVO COI data from InfoED with VIVO for " + pb . getCwid ( ) ) ; if ( this . vivoCoiMap . containsKey ( pb . getCwid ( ) ) ) { StringBuilder sb = new StringBuilder ( ) ; sb . append ( "WITH <http://vitro.mannlib.cornell.edu/a/graph/wcmcPeople> \n" ) ; sb . append ( "DELETE { \n" ) ; sb . append ( "<" + this . vivoNamespace + "cwid-" + pb . getCwid ( ) . trim ( ) + "> <http://weill.cornell.edu/vivo/ontology/wcmc#externalRelationships> ?o .\n" ) ; sb . append ( "} \n" ) ; sb . append ( "INSERT { \n" ) ; sb . append ( "<" + this . vivoNamespace + "cwid-" + pb . getCwid ( ) . trim ( ) + "> <http://weill.cornell.edu/vivo/ontology/wcmc#externalRelationships> \"" + this . vivoCoiMap . get ( pb . getCwid ( ) ) + "\" . \n" ) ; sb . append ( "} \n" ) ; sb . append ( "WHERE { \n" ) ; sb . append ( "OPTIONAL {<" + this . vivoNamespace + "cwid-" + pb . getCwid ( ) . trim ( ) + "> <http://weill.cornell.edu/vivo/ontology/wcmc#externalRelationships> ?o .}\n" ) ; sb . append ( "}" ) ; log . info ( sb . toString ( ) ) ; if ( ingestType . equals ( IngestType . VIVO_API . toString ( ) ) ) { try { log . info ( this . vivoClient . vivoUpdateApi ( sb . toString ( ) ) ) ; } catch ( Exception e ) { log . error ( "Api Exception" , e ) ; } } else if ( ingestType . equals ( IngestType . SDB_DIRECT . toString ( ) ) ) { TDBJenaConnect vivoJena = this . tcf . getConnectionfromPool ( "dataSet" ) ; try { runTDBSparqlUpdateTemplate ( sb . toString ( ) , vivoJena ) ; } catch ( IOException e ) { log . error ( "IOException: " , e ) ; } if ( vivoJena != null ) this . tcf . returnConnectionToPool ( vivoJena , "dataSet" ) ; } } else { log . info ( "No external relationships exist for " + pb . getCwid ( ) ) ; } }
This function will sync all the personTypeCodes from ED with VIVO rdf types
 @param pb The PeopleBean conatining all people information from ED
This function will sync all the personTypeCodes from ED with VIVO rdf types @param pb The PeopleBean conatining all people information from ED