Skip to content

Commit

Permalink
updated Field Name Decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
Newatia authored and Newatia committed Jul 8, 2022
1 parent 28b9879 commit 1019938
Showing 1 changed file with 43 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,48 @@
import java.util.HashMap;
import java.util.Map;

public class ApplicationFieldNameDecorator implements FieldNameDecorator{

private static final Map<String,String> displayNames;

static{
Map<String, String> m = new HashMap<>();

m.put("root_appType" , "Application Type");
m.put("root_appNumber" , "Application Number");
m.put("root_center" , "Center");
m.put("root_provenance" , "Provenance");
m.put("root_title" , "Title");
m.put("root_sponsorName" , "Sponsor Name");
m.put("root_status" , "Application Status");
m.put("root_substanceKey", "Substance Key");
m.put("root_Ingredient Name" , "Ingredient Name");
m.put("root_divisionClassDesc" , "Division Class Description");
m.put("root_applicationIndicationList_indication" , "Indication");
m.put("root_applicationProductList_applicationProductNameList_productName" , "Product Name");
m.put("root_applicationProductList_applicationIngredientList_applicantIngredName", "Applicant Ingredient Name");
m.put("root_applicationProductList_applicationIngredientList_unit" , "Unit");

displayNames = m;
}

@Override
public String getDisplayName(String field) {
String fdisp = displayNames.get(field);
if (fdisp == null) {
return field;
}
return fdisp;
}
public class ApplicationFieldNameDecorator implements FieldNameDecorator {

private static final Map<String, String> displayNames;

static {
Map<String, String> m = new HashMap<>();

m.put("root_appType", "Application Type");
m.put("root_appNumber", "Application Number");
m.put("root_center", "Center");
m.put("root_provenance", "Provenance");
m.put("root_title", "Title");
m.put("root_sponsorName", "Sponsor Name");
m.put("root_status", "Application Status");
m.put("root_substanceKey", "Substance Key");
m.put("root_Ingredient Name", "Ingredient Name");
m.put("root_divisionClassDesc", "Division Class Description");
m.put("root_appSubType", "Application Sub Type");
m.put("root_applicationID", "Application Type Number");
m.put("root_publicDomain", "Public Domain");

m.put("root_applicationIndicationList_indication", "Indication");

m.put("root_applicationProductList_dosageForm", "Dosage Form");

m.put("root_applicationProductList_applicationProductNameList_productName", "Product Name");

m.put("root_applicationProductList_applicationIngredientList_applicantIngredName", "Applicant Ingredient Name");
m.put("root_applicationProductList_applicationIngredientList_substanceKey", "Substance Key");
m.put("root_applicationProductList_applicationIngredientList_ingredientType", "Ingredient Type");
m.put("root_applicationProductList_applicationIngredientList_unit", "Unit");

displayNames = m;
}

@Override
public String getDisplayName(String field) {
String fdisp = displayNames.get(field);
if (fdisp == null) {
return field;
}
return fdisp;
}

}

0 comments on commit 1019938

Please sign in to comment.