remove semantic identifier clean code
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/grsf-publisher-ws@162236 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
61aee0d483
commit
5d5789d12f
|
@ -1,6 +1,5 @@
|
||||||
package org.gcube.data_catalogue.grsf_publish_ws.json.input.others;
|
package org.gcube.data_catalogue.grsf_publish_ws.json.input.others;
|
||||||
|
|
||||||
import org.gcube.data_catalogue.grsf_publish_ws.json.input.record.Common;
|
|
||||||
import org.gcube.datacatalogue.common.Constants;
|
import org.gcube.datacatalogue.common.Constants;
|
||||||
import org.json.simple.JSONObject;
|
import org.json.simple.JSONObject;
|
||||||
|
|
||||||
|
@ -88,7 +87,7 @@ public class SimilarRecordBean {
|
||||||
obj.put("description", description);
|
obj.put("description", description);
|
||||||
|
|
||||||
if(id != null && !id.isEmpty())
|
if(id != null && !id.isEmpty())
|
||||||
obj.put("id", Common.cleanSemanticId(id));
|
obj.put("id", id); //Common.cleanSemanticId(id)
|
||||||
|
|
||||||
if(name != null && !name.isEmpty())
|
if(name != null && !name.isEmpty())
|
||||||
obj.put("name", name);
|
obj.put("name", name);
|
||||||
|
|
|
@ -332,33 +332,37 @@ public class Common extends Base{
|
||||||
this.annotations = annotations;
|
this.annotations = annotations;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* Clean the semantic id
|
// * Clean the semantic id
|
||||||
* @param id
|
// * @param id
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
public static String cleanSemanticId(String id){
|
// public static String cleanSemanticId(String id){
|
||||||
|
//
|
||||||
if(id == null)
|
// if(id == null)
|
||||||
return null;
|
// return null;
|
||||||
else{
|
// else{
|
||||||
String idmodified = "";
|
// String idmodified = "";
|
||||||
if(id != null){
|
// if(id != null){
|
||||||
|
//
|
||||||
String[] splitCodesValues = id.split("\\+");
|
// String[] splitCodesValues = id.split("\\+");
|
||||||
for (int i = 0; i < splitCodesValues.length; i++) {
|
// for (int i = 0; i < splitCodesValues.length; i++) {
|
||||||
String prefixAndCode = splitCodesValues[i];
|
// String prefixAndCode = splitCodesValues[i];
|
||||||
String prefix = prefixAndCode.split(":")[0];
|
// if(prefixAndCode.length() == 0)
|
||||||
String code = prefixAndCode.split(":")[1];
|
// idmodified += "+";
|
||||||
idmodified += prefix.toLowerCase() + ":" + code.toUpperCase();
|
// else{
|
||||||
if(splitCodesValues.length > 1 && i < (splitCodesValues.length - 1))
|
// String prefix = prefixAndCode.split(":")[0];
|
||||||
idmodified += "+";
|
// String code = prefixAndCode.split(":")[1];
|
||||||
}
|
// idmodified += prefix.toLowerCase() + ":" + code.toUpperCase();
|
||||||
}
|
// if(splitCodesValues.length > 1 && i < (splitCodesValues.length - 1))
|
||||||
return idmodified;
|
// idmodified += "+";
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
}
|
// }
|
||||||
|
// return idmodified;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
|
@ -108,7 +108,7 @@ public class FisheryRecord extends Common{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFisheryId(String fisheryId) {
|
public void setFisheryId(String fisheryId) {
|
||||||
this.fisheryId = super.cleanSemanticId(fisheryId);
|
this.fisheryId = fisheryId;//super.cleanSemanticId(fisheryId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getFishingArea() {
|
public List<String> getFishingArea() {
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class StockRecord extends Common{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStockId(String stockId) {
|
public void setStockId(String stockId) {
|
||||||
this.stockId = super.cleanSemanticId(stockId);
|
this.stockId = stockId;//super.cleanSemanticId(stockId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getArea() {
|
public List<String> getArea() {
|
||||||
|
|
Loading…
Reference in New Issue