Project

General

Profile

« Previous | Next » 

Revision 47712

Fixed semantics and added test

View differences:

ApplyClaimRelsJobNode.java
110 110
	}
111 111

  
112 112

  
113
	private String getValue(final String sourceId, final String semantics, final String targetId, final long timestamp) throws MSROException{
113
	public String getValue(final String sourceId, final String semantics, final String targetId, final long timestamp) throws MSROException{
114 114
		log.debug(StringUtils.format("%s -- %s -- %s", sourceId, semantics, targetId));
115 115
		String[] relInfo = semantics.split(SEPARATOR);
116
		if(relInfo.length < 3){
117
			throw new MSROException("Semantics "+semantics+" not supported: must be splittable in 3 by '_'");
118
		}
116 119
		Qualifier.Builder semanticsBuilder = Qualifier.newBuilder().setClassid(relInfo[2]).setClassname(relInfo[2]);
117 120

  
118 121
		Oaf.Builder builder = Oaf.newBuilder().setKind(Kind.relation).setLastupdatetimestamp(timestamp);
......
144 147
											.build()
145 148
							))));
146 149
			break;
147
		case "resultResult_publicationDataset_isRelatedTo":
150
		case "resultResult":
148 151
			relBuilder.setResultResult(ResultResult.newBuilder()
149 152
					.setPublicationDataset(PublicationDataset.newBuilder().setRelMetadata(
150 153
							RelMetadata.newBuilder().setSemantics(

Also available in: Unified diff