Search in sources :

Example 1 with Legend

use of gov.usgs.cida.coastalhazards.model.summary.Legend in project coastal-hazards by USGS-CIDA.

the class StormUtil method buildStormTemplateSummary.

public static Summary buildStormTemplateSummary(Layer layer) {
    Summary summary = new Summary();
    Document cswDoc = getStormCswDocument(layer);
    if (cswDoc != null) {
        String title = MetadataUtil.extractFirstStringFromCswDoc(cswDoc, "/*/metadata/idinfo/citation/citeinfo/title");
        Map<String, String> titleParts = parseTitleParts(title);
        String cswAbstract = MetadataUtil.extractFirstStringFromCswDoc(cswDoc, "/*/metadata/idinfo/descript/abstract");
        List<String> dataSrcList = MetadataUtil.extractStringsFromCswDoc(cswDoc, "/*/metadata/dataqual/lineage/srcinfo/srccite/citeinfo/title");
        String surgeDescription = buildSurgeDescription(cswDoc);
        Tiny tiny = buildTinyText(titleParts);
        Medium medium = buildMediumText(titleParts);
        Full full = buildFullText(titleParts, title, surgeDescription);
        Legend legend = buildLegendText(titleParts);
        summary.setTiny(tiny);
        summary.setMedium(medium);
        summary.setFull(full);
        summary.setLegend(legend);
    }
    return summary;
}
Also used : Legend(gov.usgs.cida.coastalhazards.model.summary.Legend) Medium(gov.usgs.cida.coastalhazards.model.summary.Medium) Tiny(gov.usgs.cida.coastalhazards.model.summary.Tiny) Summary(gov.usgs.cida.coastalhazards.model.summary.Summary) Document(org.w3c.dom.Document) Full(gov.usgs.cida.coastalhazards.model.summary.Full)

Example 2 with Legend

use of gov.usgs.cida.coastalhazards.model.summary.Legend in project coastal-hazards by USGS-CIDA.

the class StormUtil method buildLegendText.

private static Legend buildLegendText(Map<String, String> titleParts) {
    Legend legend = new Legend();
    legend.setTitle(titleParts.get("name"));
    return legend;
}
Also used : Legend(gov.usgs.cida.coastalhazards.model.summary.Legend)

Aggregations

Legend (gov.usgs.cida.coastalhazards.model.summary.Legend)2 Full (gov.usgs.cida.coastalhazards.model.summary.Full)1 Medium (gov.usgs.cida.coastalhazards.model.summary.Medium)1 Summary (gov.usgs.cida.coastalhazards.model.summary.Summary)1 Tiny (gov.usgs.cida.coastalhazards.model.summary.Tiny)1 Document (org.w3c.dom.Document)1