Projects >> phenoscape-nlp >>29068f5877c4977ae57d35567912cf5c240b9146

Chunk
Conflicting content
					boolean maybesubject = false;
					List q = new ArrayList();
					ArrayList entities = new ArrayList();
<<<<<<< HEAD
					ArrayList e = new ArrayList();
					
=======
					EntityProposals e;

>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
					// Changes starting => Hariharan
					// checking if entity is really an entity or it is a quality
					// by passing to and from struct names to relational quality
Solution content
					boolean maybesubject = false;
					List q = new ArrayList();
					ArrayList entities = new ArrayList();
					ArrayList e = new ArrayList();
					
					// Changes starting => Hariharan
					// checking if entity is really an entity or it is a quality
					// by passing to and from struct names to relational quality
File
StateStatementParser.java
Developer's decision
Version 1
Kind of conflict
Method invocation
Variable
Chunk
Conflicting content
					// checking if entity is really an entity or it is a quality
					// by passing to and from struct names to relational quality
					// strategy.
<<<<<<< HEAD
					
					Structure2Quality rq = new Structure2Quality(root,
							toname, toid, fromname, fromid, keyentities);
					rq.handle();
					
					if (rq.qualities.size() > 0) {
						StructuredQualities.addAll(rq.identifiedqualities);
						//if (rq.qualities.size() > 0) {
							//e = null;//e is now showed to be a quality
							q.addAll(rq.qualities);
							// relation.detach();
						//}
					}
					else{
					try {
						maybesubject = maybeSubject(root, fromid);
					} catch (Exception e1) {
						e1.printStackTrace();
					}
					RelationHandler rh = new RelationHandler(root, relname,
							toname, toid, fromname, fromid, neg, false);
					rh.handle();
					if(rh.getEntity()!=null)
					e.add(rh.getEntity());
					
					 q = new ArrayList();
					if(rh.getQuality()!=null) q.add(rh.getQuality());
					if (rh.otherEQs.size() > 0)
						this.EQStatements.addAll(rh.otherEQs);
=======

					Structure2Quality rq1 = new Structure2Quality(root,
							toname, toid, keyentities);
					rq1.handle();

					Structure2Quality rq2 = new Structure2Quality(root,
							fromname, fromid, keyentities);
					rq2.handle();
					if (rq1.qualities.size() > 0) {
						StructuredQualities.addAll(rq1.identifiedqualities);
						e = null;//e is now showed to be a quality
						q.addAll(rq1.qualities);
					}else if (rq2.qualities.size() > 0) {
						StructuredQualities.addAll(rq2.identifiedqualities);
						e = null;//e is now showed to be a quality
						q.addAll(rq2.qualities);
					}else{
						try {
							maybesubject = maybeSubject(root, fromid);
						} catch (Exception e1) {
							e1.printStackTrace();
						}
						RelationHandler rh = new RelationHandler(root, relname,
								toname, toid, fromname, fromid, neg, false);
						rh.handle();

						e = rh.getEntity();
						q = new ArrayList();
						if(rh.getQuality()!=null) q.add(rh.getQuality());
						if (rh.otherEQs.size() > 0)
							this.EQStatements.addAll(rh.otherEQs);
>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
					}

					// Changes Ending => Hariharan Include flag below to make
Solution content
					// checking if entity is really an entity or it is a quality
					// by passing to and from struct names to relational quality
					// strategy.


					Structure2Quality rq1 = new Structure2Quality(root,
							toname, toid, keyentities);
					rq1.handle();

					Structure2Quality rq2 = new Structure2Quality(root,
							fromname, fromid, keyentities);
					rq2.handle();
					if (rq1.qualities.size() > 0) {
						StructuredQualities.addAll(rq1.identifiedqualities);
						e = null;//e is now showed to be a quality
						q.addAll(rq1.qualities);
					}else if (rq2.qualities.size() > 0) {
						StructuredQualities.addAll(rq2.identifiedqualities);
						e = null;//e is now showed to be a quality
						q.addAll(rq2.qualities);
					}
					else{
					try {
						maybesubject = maybeSubject(root, fromid);
					} catch (Exception e1) {
						e1.printStackTrace();
					}
					RelationHandler rh = new RelationHandler(root, relname,
							toname, toid, fromname, fromid, neg, false);
					rh.handle();
					if(rh.getEntity()!=null)
					e.add(rh.getEntity());
					
					 q = new ArrayList();
					if(rh.getQuality()!=null) q.add(rh.getQuality());
					if (rh.otherEQs.size() > 0)
						this.EQStatements.addAll(rh.otherEQs);
					}
			
					// Changes Ending => Hariharan Include flag below to make
File
StateStatementParser.java
Developer's decision
Combination
Kind of conflict
Comment
If statement
Method invocation
Try statement
Variable
Chunk
Conflicting content
						e1.printStackTrace();
					} // false if fromid appears in constraintid or toid
					CharacterHandler ch = new CharacterHandler(root, character,
<<<<<<< HEAD
							ontoutil, qualityclue,this.keyentities); // may contain relational
													// quality
=======
							ontoutil, qualityclue); // may contain relational
					// quality
>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
					ch.handle();
					qualities = ch.getQualities();
					ArrayList entities = new ArrayList();
Solution content
						e1.printStackTrace();
					} // false if fromid appears in constraintid or toid
					CharacterHandler ch = new CharacterHandler(root, character,
							ontoutil, qualityclue,this.keyentities); // may contain relational
													// quality

					ch.handle();
					qualities = ch.getQualities();
					ArrayList entities = new ArrayList();
File
StateStatementParser.java
Developer's decision
Version 1
Kind of conflict
Attribute
Comment
Variable
Chunk
Conflicting content
	private void constructureEQStatementProposals(
			List qualities, ArrayList entities) {
<<<<<<< HEAD
		ArrayList tempholder = new ArrayList();//Used to identify related entites which are also entities for that EQ statement
		if((entities!=null)&&(qualities!=null))
=======

>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
		for (QualityProposals qualityp : qualities){
			for (EntityProposals entityp : entities) {
				EQStatementProposals eqp = new EQStatementProposals();
Solution content
	private void constructureEQStatementProposals(
			List qualities, ArrayList entities) {

		if((entities!=null)&&(qualities!=null))
		for (QualityProposals qualityp : qualities){
			for (EntityProposals entityp : entities) {
				EQStatementProposals eqp = new EQStatementProposals();
File
StateStatementParser.java
Developer's decision
Combination
Kind of conflict
Comment
If statement
Method invocation
Variable
Chunk
Conflicting content
					for(Entity entity: entityp.getProposals()){
						EQStatement eq= new EQStatement();
						eq.setEntity(entity);
<<<<<<< HEAD
=======
						if (quality instanceof RelationalQuality) {
							eq.setQuality(((RelationalQuality) quality));
							//							if (entity.getPrimaryEntityLabel() == ((RelationalQuality) quality).relatedentity
							//									.getPrimaryEntityLabel()){
							//								continue;
							//							} //don't recall what the above does --Hong May 20, 13.
						} else{
>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
							eq.setQuality(quality);
						eq.setSource(this.src);
						eq.setCharacterId(this.characterid);
Solution content
					for(Entity entity: entityp.getProposals()){
						EQStatement eq= new EQStatement();
						eq.setEntity(entity);
						eq.setQuality(quality);
						eq.setSource(this.src);
						eq.setCharacterId(this.characterid);
File
StateStatementParser.java
Developer's decision
Version 1
Kind of conflict
Comment
If statement
Method invocation
Chunk
Conflicting content
			entities = integrateSpatial(e, this.keyentities);
			// TODO integrate entity with keyentities
		}
<<<<<<< HEAD
		Iterator entityitr =e.listIterator();
		while(entityitr.hasNext())
		{
			// if e is whole_organism
			EntityProposals ep = (EntityProposals) entityitr.next();
		if (ep.getPhrase().replace("_", " ").compareTo(ApplicationUtilities.getProperty("unknown.structure.name")) == 0) 
			entityitr.remove();
=======

		if (e.getPhrase().replace("_", " ").compareTo(ApplicationUtilities.getProperty("unknown.structure.name")) == 0) { // if
			// e
			// is
			// whole_organism
			return (ArrayList) keyentities.clone();
>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
		}
		if(e.size()==0)
			return (ArrayList) keyentities.clone();
Solution content
			entities = integrateSpatial(e, this.keyentities);
			// TODO integrate entity with keyentities
		}

		Iterator entityitr =e.listIterator();
		while(entityitr.hasNext())
		{
			// if e is whole_organism
			EntityProposals ep = (EntityProposals) entityitr.next();
		if (ep.getPhrase().replace("_", " ").compareTo(ApplicationUtilities.getProperty("unknown.structure.name")) == 0) 
			entityitr.remove();
		}
		if(e.size()==0)
			return (ArrayList) keyentities.clone();
File
StateStatementParser.java
Developer's decision
Version 1
Kind of conflict
Cast expression
Comment
If statement
Method invocation
Return statement
Variable
While statement
Chunk
Conflicting content
		return (ArrayList) keyentities.clone();
	}

<<<<<<< HEAD
	
	
	private ArrayList resolveBaseOnPartOfRelation(ArrayList eProposals, ArrayList keyentities){
=======


	private ArrayList resolveBaseOnPartOfRelation(EntityProposals e, ArrayList keyentities){
>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
		// test part_of relations between all e proposals and each of the keyentities proposals
		int flag=0;
		for(EntityProposals e: eProposals)
Solution content
		return (ArrayList) keyentities.clone();
	}


	
	
	private ArrayList resolveBaseOnPartOfRelation(ArrayList eProposals, ArrayList keyentities){
		// test part_of relations between all e proposals and each of the keyentities proposals
		int flag=0;
		for(EntityProposals e: eProposals)
File
StateStatementParser.java
Developer's decision
Version 1
Kind of conflict
Method signature
Chunk
Conflicting content
		}
	
=======
			return (ArrayList) keyentities.clone();
		else
		return null;
<<<<<<< HEAD
	}

>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
	/**
	 * test subclass relations between all e proposals and each of the keyentities proposals
	 * if positive for any test, resolve to the subclass
Solution content
			return (ArrayList) keyentities.clone();
		else
		return null;

	}

	/**
	 * test subclass relations between all e proposals and each of the keyentities proposals
	 * if positive for any test, resolve to the subclass
File
StateStatementParser.java
Developer's decision
Version 1
Kind of conflict
Other
Chunk
Conflicting content
	public void handle() {
		try {
<<<<<<< HEAD
			parseforQuality(this.tostructname, this.tostructid); //to see if the structure is a quality (relational or other quality)
			parseforQuality(this.fromstructname, this.fromstructid);

=======
			parseforQuality(this.structname, this.structid); //to see if the structure is a quality (relational or other quality)
			//detach all identifiedqualities
			for(String structid: identifiedqualities){
				Element structure = (Element) XPath.selectSingleNode(root, ".//structure[id='"+structid+"']");
				structure.detach(); //identifiedqualities are used to check the relations this structure is involved in, 
									//and the relations are needed for other purpose, 
									//so don't detach relation here. 
			}
>>>>>>> 41d6c912a5b1e93c4208651ed336290f1e6c3623
		} catch (JDOMException e) {
			e.printStackTrace();
		}
Solution content
	public void handle() {
		try {

			parseforQuality(this.structname, this.structid); //to see if the structure is a quality (relational or other quality)
			//detach all identifiedqualities
			for(String structid: identifiedqualities){
				Element structure = (Element) XPath.selectSingleNode(root, ".//structure[id='"+structid+"']");
				structure.detach(); //identifiedqualities are used to check the relations this structure is involved in, 
									//and the relations are needed for other purpose, 
									//so don't detach relation here. 
			}
		} catch (JDOMException e) {
			e.printStackTrace();
		}
File
Structure2Quality.java
Developer's decision
Version 2
Kind of conflict
Comment
For statement
Method invocation