List of usage examples for java.util ResourceBundle getString
public final String getString(String key)
From source file:MainClass.java
public static void main(String[] args) { Locale locale = Locale.getDefault(); ResourceBundle rb = ResourceBundle.getBundle("MyResources", locale); JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("I18N Test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setLayout(new GridLayout(3, 2)); frame.add(new JLabel(rb.getString("userName"))); frame.add(new JTextField()); frame.add(new JLabel(rb.getString("password"))); frame.add(new JPasswordField()); frame.add(new JButton(rb.getString("login"))); frame.pack();//from w ww . j a v a2 s . co m frame.setVisible(true); }
From source file:JAXRGetMyObjects.java
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("JAXRExamples"); String queryURL = bundle.getString("query.url"); String publishURL = bundle.getString("publish.url"); String username = bundle.getString("registry.username"); String password = bundle.getString("registry.password"); JAXRGetMyObjects jq = new JAXRGetMyObjects(); jq.makeConnection(queryURL, publishURL); jq.executeQuery(username, password); }/*from w w w .ja v a 2 s .co m*/
From source file:JAXRPublishConcept.java
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("JAXRExamples"); String queryURL = bundle.getString("query.url"); String publishURL = bundle.getString("publish.url"); String username = bundle.getString("registry.username"); String password = bundle.getString("registry.password"); JAXRPublishConcept jpc = new JAXRPublishConcept(); jpc.makeConnection(queryURL, publishURL); jpc.executePublish(username, password); }//from w w w . j av a 2 s . c o m
From source file:JAXRSaveClassificationScheme.java
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("JAXRExamples"); String queryURL = bundle.getString("query.url"); String publishURL = bundle.getString("publish.url"); // Edit to provide your own username and password // Defaults for Registry Server are testuser/testuser String username = bundle.getString("registry.username"); String password = bundle.getString("registry.password"); JAXRSaveClassificationScheme jscs = new JAXRSaveClassificationScheme(); jscs.makeConnection(queryURL, publishURL); jscs.executePublish(username, password); }//from ww w . jav a 2 s . co m
From source file:JAXRPublish.java
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("JAXRExamples"); String queryURL = bundle.getString("query.url"); String publishURL = bundle.getString("publish.url"); String username = bundle.getString("registry.username"); String password = bundle.getString("registry.password"); JAXRPublish jp = new JAXRPublish(); jp.makeConnection(queryURL, publishURL); jp.executePublish(username, password); }//from w w w .j a v a 2s .c om
From source file:JAXRDelete.java
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("JAXRExamples"); Key key = null;/*from ww w.j a v a2s . c o m*/ String queryURL = bundle.getString("query.url"); String publishURL = bundle.getString("publish.url"); String username = bundle.getString("registry.username"); String password = bundle.getString("registry.password"); if (args.length < 1) { System.out.println("Argument required: " + "-Dkey-string=<value>"); System.exit(1); } String keyString = args[0]; System.out.println("Key string is " + keyString); JAXRDelete jd = new JAXRDelete(); jd.makeConnection(queryURL, publishURL); key = jd.createOrgKey(keyString); if (key != null) { jd.executeRemove(key, username, password); } else { System.out.println("Key not found, nothing to remove"); } }
From source file:JAXRDeleteConcept.java
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("JAXRExamples"); Key key = null;//from w w w. j av a2 s. co m String queryURL = bundle.getString("query.url"); String publishURL = bundle.getString("publish.url"); String username = bundle.getString("registry.username"); String password = bundle.getString("registry.password"); if (args.length < 1) { System.out.println("Argument required: -Duuid-string=<value>"); System.exit(1); } String uuidString = args[0]; System.out.println("UUID string is " + uuidString); JAXRDeleteConcept jdc = new JAXRDeleteConcept(); jdc.makeConnection(queryURL, publishURL); key = jdc.createKey(uuidString); if (key != null) { jdc.executeRemove(key, username, password); } else { System.out.println("Key not found, nothing to remove"); } }
From source file:JAXRDeleteScheme.java
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("JAXRExamples"); Key key = null;//from ww w . j a v a2 s . c o m String queryURL = bundle.getString("query.url"); String publishURL = bundle.getString("publish.url"); String username = bundle.getString("registry.username"); String password = bundle.getString("registry.password"); if (args.length < 1) { System.out.println("Argument required: " + "-Duuid-string=<value>"); System.exit(1); } String keyString = args[0]; System.out.println("UUID string is " + keyString); JAXRDeleteScheme jd = new JAXRDeleteScheme(); jd.makeConnection(queryURL, publishURL); key = jd.createSchemeKey(keyString); if (key != null) { jd.executeRemove(key, username, password); } else { System.out.println("Key not found, nothing to remove"); } }
From source file:JAXRQueryByNAICSClassification.java
public static void main(String[] args) { ResourceBundle bundle = ResourceBundle.getBundle("JAXRExamples"); String queryURL = bundle.getString("query.url"); String publishURL = bundle.getString("publish.url"); JAXRQueryByNAICSClassification jq = new JAXRQueryByNAICSClassification(); jq.makeConnection(queryURL, publishURL); jq.executeQuery();// w w w . j a va2 s .c o m }
From source file:JAXRQuery.java
public static void main(String[] args) { ResourceBundle registryBundle = ResourceBundle.getBundle("JAXRExamples"); String queryURL = registryBundle.getString("query.url"); String publishURL = registryBundle.getString("publish.url"); if (args.length < 1) { System.out.println("Argument required: " + "-Dquery-string=<value>"); System.exit(1);/*w ww . j av a 2s . c om*/ } String queryString = args[0]; System.out.println("Query string is " + queryString); JAXRQuery jq = new JAXRQuery(); jq.makeConnection(queryURL, publishURL); jq.executeQuery(queryString); }