Package org.openmrs

Examples of org.openmrs.LocationTag


        if ( locationTags != null) {
            List<LocationTag> tags = new ArrayList<LocationTag>();
            String[] temp = locationTags.split(",");
            for (String s : temp) {
                LocationTag tag = getLocationTag(s);
                if (tag == null) {
                    throw new RuntimeException("Cannot find tag: " + tag);
                }
                tags.add(tag);
            }
View Full Code Here


     * @param identifier
     * @return
     */
    public static LocationTag getLocationTag(String identifier) {

        LocationTag tag = null;

        if (identifier != null) {

            identifier = identifier.trim();

View Full Code Here

                List<LocationTag> tags = new ArrayList<LocationTag>();
                String temp[] = ((String) parameters.get("tags")).split(",");
                for (String s : temp) {

                    LocationTag tag = HtmlFormEntryUtil.getLocationTag(s);
                    if (tag == null) {
                        throw new RuntimeException("Cannot find tag: " + tag);
                    }
                    tags.add(tag);
                }
View Full Code Here

    @Verifies(value="shouldFetchLocationTagByName", method="getLocationTag(String identifier)")
    public void shouldFetchLocationTagByName() throws Exception {
        // this tag is in the regression test dataset
        executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REGRESSION_TEST_DATASET));

        LocationTag tag = HtmlFormEntryUtil.getLocationTag("Some Tag");
        Assert.assertNotNull(tag);
        Assert.assertEquals("Some Tag", tag.getTag());
    }
View Full Code Here

    @Verifies(value="shouldFetchLocationTagById", method="getLocationTag(String identifier)")
    public void shouldFetchLocationTagById() throws Exception {
        // this tag is in the regression test dataset
        executeDataSet(XML_DATASET_PATH + new TestUtil().getTestDatasetFilename(XML_REGRESSION_TEST_DATASET));

        LocationTag tag = HtmlFormEntryUtil.getLocationTag("1001");
        Assert.assertNotNull(tag);
        Assert.assertEquals("Some Tag", tag.getTag());
    }
View Full Code Here

TOP

Related Classes of org.openmrs.LocationTag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.