Please review the following piece of code:
try {
db.beginTransaction();
db.execSQL(DBConstants.PRAG_FOR_KEYS_ON);
db.execSQL(DBConstants._BLDG_CREATE);
db.execSQL(DBConstants._BLDG_INDEX);
for(int x = 0; x < 28; x = x+1){
db.execSQL(DBConstants._BLDG_INSERT+x);
}
db.execSQL(DBConstants.PRAG_FOR_KEYS_OFF);
db.setTransactionSuccessful();
} catch (SQLException e) {
e.printStackTrace();
}finally{
db.endTransaction();
}
Each of the insert constants (representing a row of new data) are numbered thus:
public static final String _BLDG_INSERT0 = "<SQL insert statement>"
...all the way up to 28 ("_BLDG_INSERT28").
Is there ANY way i can execute these SQL statements in a for loop? If i can, how do i concactenate the number on to the name of the constant AND have it recognized by the java interpreter in the correct way?
Thanks!
It's not clear from the question whether you are able to change the constants. If you can, it would be better if you could put the statements in an array.
String[] _BLDG_INSERT = {"<SQL insert statement>", // 0
"<SQL insert statement>", // 1
...
"<SQL insert statement>" // 28
};
And then you can just access them like this.
for(int x = 0; x < 28; x = x+1){
db.execSQL(DBConstants._BLDG_INSERT[x]);
}
Or better still:
for(String s : DBConstants._BLDG_INSERT) {
db.execSQL(s);
}
public ArrayList<String> getAllRecord()
{
ArrayList<String> total = new ArrayList<String>();
Cursor cursor1 = null;
try
{
cursor1 = getDBobject().rawQuery(
"select * from "
+ Your table name + ";", null);
if (cursor1.moveToFirst())
{
do
{
String cid = cursor1.getString(1);
total.add(cid);
}
while (cursor1.moveToNext());
}
}
catch (Exception e)
{
System.out.println("" + TAG + " :" + e);
}
finally
{
if (cursor1 != null && !cursor1.isClosed())
{
cursor1.close();
}
}
return total;
}
This will return you all the datas according to your insertion order
Try something like this:
public class testeReflection {
public static void main(String[] args) throws IllegalArgumentException, IllegalAccessException{
MyClass myClass = new MyClass();
Class aClass = MyClass.class;
for(int i = 0; i < 5; i++){
try {
Field field = aClass.getField("VAR" + i);
String s = (String)field.get(myClass);
System.out.println("myClass[" + i + "] = " + s);
} catch (NoSuchFieldException ex) {
Logger.getLogger(testeReflection.class.getName()).log(Level.SEVERE, null, ex);
} catch (SecurityException ex) {
Logger.getLogger(testeReflection.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
public static class MyClass{
public static final String VAR0 = "VARIAVEL 01";
public static final String VAR1 = "VARIAVEL 02";
public static final String VAR2 = "VARIAVEL 03";
public static final String VAR3 = "VARIAVEL 04";
public static final String VAR4 = "VARIAVEL 05";
}
}
Related
I have the following class imp with inner class ScoringSummaryImplementation, when I tested the mean() method alone it works correctly, but when I test it as I show in the main method the answer goes incorrectly, I need to know the reason:
public class imp implements Normalizer {
public static List<BigDecimal> dataToBeNormalized = new ArrayList<>();
#Override
public ScoringSummary zscore(Path csvPath, Path destPath, String colToStandardize) {
ScoringSummary scoringObejct = new ScoringSummaryImplementation();
if (!Files.exists(csvPath)) {
throw new IllegalArgumentException("source file not found");
}
try {
readDataToBeNormalized(csvPath, destPath, colToStandardize);
} catch (IOException ex) {
Logger.getLogger(imp.class.getName()).log(Level.SEVERE, null, ex);
} catch (CsvValidationException ex) {
Logger.getLogger(imp.class.getName()).log(Level.SEVERE, null, ex);
}
//Z-score
for (int i = 0; i < dataToBeNormalized.size(); i++) {
BigDecimal sub = (dataToBeNormalized.get(i).subtract(scoringObejct.mean()));
try {
BigDecimal divide = sub.divide(scoringObejct.standardDeviation(), 2, RoundingMode.HALF_EVEN);
dataToBeNormalized.set(i, divide);
} catch (ArithmeticException e) {
}
}
return scoringObejct;
}
private void readDataToBeNormalized(Path csvPath, Path destPath, String colToStandardize) throws FileNotFoundException, IOException, CsvValidationException {
int indexOfTheCol = -1;
CSVReader reader = new CSVReader(new FileReader(csvPath.toString()));
String[] header = reader.readNext();
for (int i = 0; i < header.length; i++) {
if (header[i].equalsIgnoreCase(colToStandardize)) {
indexOfTheCol = i;
}
}
if (indexOfTheCol == -1) {
throw new IllegalArgumentException("column " + colToStandardize + " not found");
}
String[] values;
while ((values = reader.readNext()) != null) {
dataToBeNormalized.add(new BigDecimal(values[indexOfTheCol]));
}
}
//Inner class to implement ScoringSummary
public static class ScoringSummaryImplementation implements ScoringSummary {
#Override
public BigDecimal mean() {
BigDecimal sum = new BigDecimal("0");
BigDecimal sizeOfTheList = new BigDecimal(dataToBeNormalized.size());
for (int i = 0; i < dataToBeNormalized.size(); i++) {
sum = sum.add(dataToBeNormalized.get(i));
}
sum.divide(sizeOfTheList, 2, RoundingMode.HALF_EVEN);
return sum.divide(sizeOfTheList, 2, RoundingMode.HALF_EVEN);
}
}
}
// test in the main:
public class Test {
public static void main(String [] args){
Path p = Paths.get("C:\\Users\\DELL\\Documents\\GitHub\\J2EE\\demo\\src\\main\\java\\com\\mycompany\\demo\\d.csv");
Path p2 = Paths.get("C:\\Users\\DELL\\Documents\\GitHub\\J2EE\\demo\\src\\main\\java\\com\\mycompany\\demo\\des.csv");
Normalizer n1 = new imp ();
ScoringSummary n2 = n1.zscore(p, p2, "age");
BigDecimal mean = n2.mean();
System.out.println(mean);
}
}
Here is output:
0.82
Here is age column:
|age |
|5434|
|42423|
|54534|
|3333|
I have this unit test:
private final ByteArrayOutputStream outContent = new ByteArrayOutputStream();
#Test
public void testLog_C_Indent_String() {
String message = "hallo";
IMyLog instance = getInstance();
instance.setLogFile(null);
instance.setLogConsole(true);
instance.setIndent(3);
instance.log(message);
String expectedPrefix = "\t\t\t";
String expectedText = expectedPrefix + message;
String result = outContent.toString();
assertTrue("The output is expected to be offset by 3 tabs.",
result.startsWith(expectedPrefix)
||
result.contains(expectedText));
}
I need to add a method that will give the message "hallo" with \t\t\t the result will be "\t\t\thallo".I did this method, but every time I get a message:"The output is expected to be offset by 3 tabs."
private boolean logConsole = true;
private String logFile;
private int indent = 0;
public void log(String message) {
try {
if (this.logConsole) {
System.out.println(message);
}
if (logFile.isEmpty()) {
System.out.println("file is empty");
} else {
PrintWriter writer = new PrintWriter(logFile, "UTF-8");
for (int i = 0; i < indent; i++) {
writer.println("\t");
}
writer.println();
writer.println(message);
writer.close();
}
} catch (FileNotFoundException | UnsupportedEncodingException | NullPointerException e) {
e.printStackTrace();
}
}
Can you help me?
Are you aware that println() appends a newline? So really your string looks like this:
"\t\n\t\n\t\n\nhallo\n"
Try:
for (int i = 0; i < indent; i++) {
writer.print("\t");
}
writer.print(message);
writer.close();
I just wanna get all class from my android project,someone suggest me to use dexfile,so,I try it.but it can not get all class ,for example,my packagename is "org.zj",I just wanna get some class which name start with "org.zj" but it response me "android.support.xxx" or "android.arch.xxx" .this is my code
public static List<Class> getClasses(Activity activity) {
List<Class> classes = new ArrayList<>();
try {
String packageName = activity.getPackageName();
System.out.println(packageName + " 包名");
//String packageCodePath = activity.getPackageCodePath();
classes.addAll(getClasses(packageName));
} catch (Exception e) {
e.printStackTrace();
}
return classes;
}
public static List<Class> getClasses(String packageName) {
List<Class> classes=new ArrayList<>();
List<DexFile> multiDex = getMultiDex();
for (DexFile df : multiDex) {
classes.addAll(getClassByDexFile(df,packageName));
}
return classes;
}
public static ArrayList<DexFile> getMultiDex() {
BaseDexClassLoader dexLoader = (BaseDexClassLoader) ClassUtil.class.getClassLoader();
Field f = ClassUtil.getField("pathList", "dalvik.system.BaseDexClassLoader");
Object pathList = getObjectFromField(f, dexLoader);
Field f2 = ClassUtil.getField("dexElements", "dalvik.system.DexPathList");
Object[] list = (Object[]) getObjectFromField(f2, pathList);
Field f3 = ClassUtil.getField("dexFile", "dalvik.system.DexPathList$Element");
ArrayList<DexFile> res = new ArrayList<>();
for (int i = 0; i < list.length; i++) {
DexFile d = (DexFile) getObjectFromField(f3, list[i]);
res.add(d);
}
return res;
}
public static List<Class> getClassByDexFile(DexFile dexFile, String packageName) {
List<Class> classes = new ArrayList<>();
DexFile df = dexFile;
//String regExp = "^" + packageName + ".\\w+$";
for (Enumeration iter = df.entries(); iter.hasMoreElements(); ) {
String className = (String) iter.nextElement();
System.out.println(className + "");
if (className.contains(packageName)) {
try {
classes.add(Class.forName(className));
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
}
return classes;
}
In my jFrame,I created a table that contains the patients' list and a button that allows to refresh the table on action. When I click the refresh button for the firt time, the list is displayed in the table. Howerver, when I press it for a second time it doesn't work any more and the table isn't able to be refreshed.
Any idea about the problem please?
this is the code of the refresh button:
public class Interface extends javax.swing.JFrame{
private void RefreshActionPerformed(java.awt.event.ActionEvent evt) {
DefaultTableModel model = (DefaultTableModel)worklisttable.getModel();
int rowCount = model.getRowCount();
for (int i = rowCount - 1; i >= 0; i--) {
model.removeRow(i);
}
model.fireTableDataChanged();
GetMwl_3.main(args);
}
public static void main(String args[]) {
......
}
}
GetMwl_3.java : allows to retrieve the patient list from the server
public class GetMwl_3 {
private String[] args;
/**
* #param args
*/
public static void main(String[] args/*,String aet, String host, Integer port*/) {
new GetMwl_3(/*aet,host,port*/);
}
private static final int[] RETURN_KEYS = {
Tag.AccessionNumber,
Tag.ReferringPhysicianName,
Tag.PatientName,
Tag.PatientID,
Tag.PatientBirthDate,
Tag.PatientSex,
Tag.PatientWeight,
Tag.MedicalAlerts,
Tag.Allergies,
Tag.PregnancyStatus,
Tag.StudyInstanceUID,
Tag.RequestingPhysician,
Tag.RequestingService,
Tag.RequestedProcedureDescription,
Tag.AdmissionID,
Tag.SpecialNeeds,
Tag.CurrentPatientLocation,
Tag.PatientState,
Tag.RequestedProcedureID,
Tag.RequestedProcedurePriority,
Tag.PatientTransportArrangements,
Tag.PlacerOrderNumberImagingServiceRequest,
Tag.FillerOrderNumberImagingServiceRequest,
Tag.ConfidentialityConstraintOnPatientDataDescription,
};
private static final int[] SPS_RETURN_KEYS = {
Tag.Modality,
Tag.RequestedContrastAgent,
Tag.ScheduledStationAETitle,
Tag.ScheduledProcedureStepStartDate,
Tag.ScheduledProcedureStepStartTime,
Tag.ScheduledPerformingPhysicianName,
Tag.ScheduledProcedureStepDescription,
Tag.ScheduledProcedureStepID,
Tag.ScheduledStationName,
Tag.ScheduledProcedureStepLocation,
Tag.PreMedication,
Tag.ScheduledProcedureStepStatus
};
private static final String[] LE_TS = {
UID.ExplicitVRLittleEndian,
UID.ImplicitVRLittleEndian };
private static final byte[] EXT_NEG_INFO_FUZZY_MATCHING = { 1, 1, 1 };
private Device device;
private final NetworkApplicationEntity remoteAE = new NetworkApplicationEntity();
private final NetworkConnection remoteConn = new NetworkConnection();
private final NetworkApplicationEntity ae = new NetworkApplicationEntity();
private final NetworkConnection conn = new NetworkConnection();
private final DicomObject keys = new BasicDicomObject();
private final DicomObject spsKeys = new BasicDicomObject();
private Association assoc;
private int priority = 0;
private int cancelAfter = Integer.MAX_VALUE;//ÐœÐ°ÐºÑ ÐºÐ¾Ð»Ð¸Ñ‡ÐµÑтво Ñтрок
private boolean fuzzySemanticPersonNameMatching;
private Component emptyLabel;
public GetMwl_3(/*String aet, String host, Integer port*/) {
String name = "DCMMWL";
device = new Device(name);
NewThreadExecutor executor = new NewThreadExecutor(name);
remoteAE.setInstalled(true);
remoteAE.setAssociationAcceptor(true);
remoteAE.setNetworkConnection(new NetworkConnection[] { remoteConn });
device.setNetworkApplicationEntity(ae);
device.setNetworkConnection(conn);
ae.setNetworkConnection(conn);
ae.setAssociationInitiator(true);
ae.setAETitle(name);
for (int i = 0; i < RETURN_KEYS.length; i++) {
keys.putNull(RETURN_KEYS[i], null);
}
keys.putNestedDicomObject(Tag.RequestedProcedureCodeSequence,
new BasicDicomObject());
keys.putNestedDicomObject(Tag.ScheduledProcedureStepSequence, spsKeys);
for (int i = 0; i < SPS_RETURN_KEYS.length; i++) {
spsKeys.putNull(SPS_RETURN_KEYS[i], null);
}
spsKeys.putNestedDicomObject(Tag.ScheduledProtocolCodeSequence,
new BasicDicomObject());
/////////
Properties pacs = new Properties();
InputStream file = null;
File thefile = new File("C:\\properties\\save.properties");
if (thefile.exists()){
try {
file = new FileInputStream("C:\\properties\\save.properties");
// load a properties file
pacs.load(file);
// get the property value and print it out
remoteAE.setAETitle( pacs.getProperty("aethl7"));
remoteConn.setHostname(pacs.getProperty("hosthl7"));
remoteConn.setPort(Integer.parseInt(pacs.getProperty("porthl7")));
} catch (IOException ex) {
ex.printStackTrace();
} finally {
if (file != null) {
try {
file.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
addSpsMatchingKey(Tag.ScheduledProcedureStepStartDate,"20131030");
setTransferSyntax(LE_TS);
long t1 = System.currentTimeMillis();
try {
assoc = ae.connect(remoteAE, executor);
} catch (Exception e) {
// System.err.println("ERROR: Failed to establish association:");
//e.printStackTrace(System.err);
//jLabel7.setText("ERROR: Failed to establish association");
javax.swing.JOptionPane.showMessageDialog(null,"Liste des patients ne peut pas être retirée");
//System.exit(2);
}
long t2 = System.currentTimeMillis();
System.out.println("Connected to " + remoteAE + " in "
+ ((t2 - t1) / 1000F) + "s");
//jLabel6.setText("Connected to " + remoteAE + " in "
// + ((t2 - t1) / 1000F) + "s");
try {
List<DicomObject> result = query();
long t3 = System.currentTimeMillis();
System.out.println("Received " + result.size()
+ " matching entries in " + ((t3 - t2) / 1000F) + "s");
for(DicomObject dcm : result) {
worklist.main(args,
dcm.getString(Tag.PatientID),
dcm.getString(Tag.AccessionNumber),
dcm.getString(Tag.PatientName),
dcm.getString(Tag.PatientBirthDate),
dcm.getString(Tag.PatientSex),
dcm.getString(Tag.ReferringPhysicianName)
);
}
javax.swing.JOptionPane.showMessageDialog(null,"Liste des patients retirée avec succée");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
assoc.release(true);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("Released connection to " + remoteAE);
}
}
public void setTransferSyntax(String[] ts) {
TransferCapability tc = new TransferCapability(
UID.ModalityWorklistInformationModelFIND, ts,
TransferCapability.SCU);
if (fuzzySemanticPersonNameMatching)
tc.setExtInfo(EXT_NEG_INFO_FUZZY_MATCHING);
ae.setTransferCapability(new TransferCapability[]{tc});
}
public void addSpsMatchingKey(int tag, String value) {
spsKeys.putString(tag, null, value);
}
public List<DicomObject> query() throws IOException, InterruptedException {
TransferCapability tc = assoc.getTransferCapabilityAsSCU(
UID.ModalityWorklistInformationModelFIND);
if (tc == null) {
throw new NoPresentationContextException(
"Modality Worklist not supported by "
+ remoteAE.getAETitle());
}
DimseRSP rsp = assoc.cfind(UID.ModalityWorklistInformationModelFIND,
priority, keys, tc.getTransferSyntax()[0], cancelAfter);
List<DicomObject> result = new ArrayList<DicomObject>();
while (rsp.next()) {
DicomObject cmd = rsp.getCommand();
if (CommandUtils.isPending(cmd)) {
DicomObject data = rsp.getDataset();
result.add(data);
}
}
return result;
}
}
worklist.java :
public class worklist extends Interface{
public worklist(){
}
public static void main(String[] args,
String PatientID,
String accessingNumber,
String PatientName,
String BirthDate,
String sex,
String referringPhysician
) {
DefaultTableModel modelw=(DefaultTableModel)worklisttable.getModel();
modelw.setColumnIdentifiers(new String[]{"ID Patient"," Nom Patient","Date de Naissance","Sexe"});
DefaultTableCellRenderer centerRenderer= new DefaultTableCellRenderer();
centerRenderer.setHorizontalAlignment(JLabel.CENTER);
worklisttable.getColumnModel().getColumn(0).setCellRenderer(centerRenderer);
for (int j = 0 ; j< worklisttable.getColumnCount(); j++)
{
worklisttable.getColumnModel().getColumn(j).setCellRenderer(centerRenderer);
}
row=new Object[4];
row[0]=PatientID;
row[1]=PatientName;
row[2]=BirthDate;
row[3]=sex;
modelw.addRow(row);
}
}
I am beginner in selenium webdriver, I am trying to work with different locator by reading excel sheet but in these it take only one data put it in one field by finding locator "id", and when it come to the second text field for this we are using locator by "Xpath" but its not taking. So, my question is how can I work with different locator also by don't using switch case if possible.
Below are my code:
public class MainClass {
private static final String BROWSER_PATH = "D:\\firefox.exe";
private static final String TEST_SUITE_PATH = "D:\\GmailTestSuite.xls";
private static final String OBJECT_REPOSITORY_PATH = "D:\\objectrepository.xls";
private static final String ADDRESS_TO_TEST = "https://www.gmail.com";
// other constants
private WebDriver driver;
private Properties properties;
/*private WebElement we;*/
public MainClass() {
File file = new File(BROWSER_PATH);
FirefoxBinary fb = new FirefoxBinary(file);
driver = new FirefoxDriver(fb, new FirefoxProfile());
driver.get(ADDRESS_TO_TEST);
}
public static void main(String[] args) throws IOException, BiffException {
MainClass main = new MainClass();
main.handleTestSuite();
}
private void handleTestSuite() throws BiffException, IOException {
ReadPropertyFile readConfigFile = new ReadPropertyFile();
properties = readConfigFile.loadPropertiess();
ExcelHandler testSuite = new ExcelHandler(TEST_SUITE_PATH, "Suite");
testSuite.columnData();
int rowCount = testSuite.rowCount();
System.out.println("Total Rows=" + rowCount);
for (int i = 1; i < rowCount; i++) {
String executable = testSuite.readCell(testSuite.getCell("Executable"), i);
System.out.println("Executable=" + executable);
if (executable.equalsIgnoreCase("y")) {
// exe. the process
String scenarioName = testSuite.readCell(testSuite.getCell("TestScenario"), i);
System.out.println("Scenario Name=" + scenarioName);
handleScenario(scenarioName);
}
}
}
private void handleScenario(String scenarioName) throws BiffException, IOException {
ExcelHandler testScenarios = new ExcelHandler(TEST_SUITE_PATH);
testScenarios.setSheetName("Login");
testScenarios.columnData();
int rowWorkBook1 = testScenarios.rowCount();
for (int j = 1; j < rowWorkBook1; j++) {
String framWork = testScenarios.readCell(testScenarios.getCell("FrameworkName"), j);
String operation = testScenarios.readCell(testScenarios.getCell("Operation"), j); // SendKey
String value = testScenarios.readCell(testScenarios.getCell("Value"), j);
System.out.println("FRMNameKK=" + framWork + ",Operation=" + operation +
",Value=" + value);
handleObjects(operation,value,framWork);
}
}
private void handleObjects(String operation,String value,String framWork) throws BiffException, IOException
{
System.out.println("HandleObject--> "+framWork);
ExcelHandler objectRepository = new ExcelHandler(OBJECT_REPOSITORY_PATH, "OR");
objectRepository.columnData();
int rowCount = objectRepository.rowCount();
System.out.println("Total Rows in hadleObject=" + rowCount);
for (int k = 1; k < rowCount; k++) {
String frameWorkName = objectRepository.readCell(objectRepository.getCell("FrameworkName"), k);
String ObjectName = objectRepository.readCell(objectRepository.getCell("ObjectName"), k);
String Locator = objectRepository.readCell(objectRepository.getCell("Locator"), k); // SendKey
System.out.println("FrameWorkNameV=" + frameWorkName +
",ObjectName=" + ObjectName + ",Locator=" + Locator);
if(framWork.equalsIgnoreCase(frameWorkName))
{
operateWebDriver(operation,Locator,value,ObjectName);
}
}
}
private void operateWebDriver(String operation,String Locator,String value, String objectName)
{
System.out.println("Operation execution in progress");
WebElement temp=getElement(Locator,objectName);
if (operation.equalsIgnoreCase("SendKey"))
{
temp.sendKeys(value);
}
if (operation.equalsIgnoreCase("Click"))
{
temp.click();
}
}
public WebElement getElement(String locator,String objectName)
{
WebElement temp = null;
if(locator.equalsIgnoreCase("id"))
{
temp = driver.findElement(By.id(objectName));
}else if(locator.equalsIgnoreCase("xpath")) {
temp = driver.findElement(By.xpath(objectName));
}
if(locator.equalsIgnoreCase("link"))
{
}
return temp;
}
}
You need the Reflection. See example in 2 methods below:
import java.lang.reflect.Method;
...
#Test
public void TestAmazon() {
driver = new ChromeDriver();
driver.navigate().to("http://www.amazon.com");
String locatorType = "id";
String locatorExpression = "twotabsearchtextbox";
By locator = createLocator(locatorType, locatorExpression);
WebElement textbox = driver.findElement(locator);
textbox.sendKeys("Star Wars: The Digital Movie Collection");
textbox.sendKeys(Keys.ENTER);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
locatorType = "className";
locatorExpression = "nav-logo-link";
locator = createLocator(locatorType, locatorExpression);
driver.findElement(locator).click();
}
private By createLocator(String locatorType, final String locatorExpression) {
By locator = null;
Class<By> byClass = By.class;
Class[] argTypes = new Class[] { String.class };
try {
Method m = byClass.getDeclaredMethod(locatorType, argTypes);
try {
locator = (By)m.invoke(null,locatorExpression);
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return locator;
}