Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 2.49 KB

README.md

File metadata and controls

40 lines (29 loc) · 2.49 KB

build status Quality Gate Status Coverage sonarcloud bugs sonarcloud maintainability sonarcloud security sonarcloud reliability

JosmTemplateParser

Usage

    try {
        JosmTemplateParser parser = new JosmTemplateParser(new ByteArrayInputStream(filterString.getBytes()));
        List<Formatter> formatters = parser.formatters();
        .....
    } catch (ParseException pex) {
        ...
    } catch (Error err) {
        ...
    }

Your OSM elements object must either implement the Meta interface or be wrapped in an object that implements it. The object can then be passed to the Formatter.format method, resp. Util.listFormat.

Currently there is no documentation of the grammar outside of Name template details which however has multiple errors and inconsistencies.

Note that the {special:localName} template simply returns the value of the name tag.

Including in your project

You can either download the jar from github or add the following to your build.gradle

...
    repositories {
        ...   
        mavenCentral()
        ...              
    }
...

dependencies {
    ...
    compile 'ch.poole.osm:JosmTemplateParser:0.2.0'
    ...
}