semanticwfs  Version 0.1.0.0
MapCSSFormatter Class Reference

Reads an ontological style description and formats it to OSM Map CSS. More...

Inheritance diagram for MapCSSFormatter:
Collaboration diagram for MapCSSFormatter:

Public Member Functions

String formatter (ResultSet results, String featuretype) throws XMLStreamException
 
String formatGeometry (String geometrytype, StyleObject styleobj)
 Formats a geometry according to a given geometrytype using information from a given styleobj. More...
 
String formatHeader ()
 
String formatFooter ()
 

Static Public Member Functions

static ResultStyleFormatter getFormatter (String formatString)
 Gets a style formatter for a chosen style type. More...
 

Public Attributes

Integer lastQueriedElemCount =0
 
String mimeType ="text/plain"
 
String exposedType ="application/vnd.geo+json"
 
String styleAttribute =""
 

Static Public Attributes

static Map< String, ResultStyleFormatterresultMap =new TreeMap<String, ResultStyleFormatter>()
 

Static Package Functions

 [static initializer]
 

Detailed Description

Reads an ontological style description and formats it to OSM Map CSS.

Member Function Documentation

◆ [static initializer]()

[static initializer]
staticpackageinherited

◆ formatFooter()

String formatFooter ( )
inherited
78  {
79  return "";
80  }

◆ formatGeometry()

String formatGeometry ( String  geometrytype,
StyleObject  styleobj 
)

Formats a geometry according to a given geometrytype using information from a given styleobj.

Parameters
geometrytypethe geometry
styleobjthe styleobject to use for formatting
Returns
the formatString to use for styling

Reimplemented from ResultStyleFormatter.

20  {
21  StringBuilder builder=new StringBuilder();
22  builder.append("{}");
23  return builder.toString();
24  }

◆ formatHeader()

String formatHeader ( )
inherited
74  {
75  return "";
76  }

◆ formatter()

String formatter ( ResultSet  results,
String  featuretype 
) throws XMLStreamException
Parameters
results
featuretype
Returns
Exceptions
XMLStreamException

Reimplemented from ResultStyleFormatter.

14  {
15  return null;
16  }

◆ getFormatter()

static ResultStyleFormatter getFormatter ( String  formatString)
staticinherited

Gets a style formatter for a chosen style type.

Parameters
formatStringthe formatString indicating a given style type
Returns
a ResultStyleFormatter generating the chosen style type
31  {
32  formatString=formatString.toLowerCase();
33  if(resultMap.containsKey(formatString)) {
34  return resultMap.get(formatString);
35  }
36  formatString=formatString.replace("+","");
37  if(formatString.contains("mapcss")) {
38  return resultMap.get("mapcss");
39  }
40  if(formatString.contains("geojsoncss")) {
41  return resultMap.get("geojsoncss");
42  }
43  if(formatString.contains("sld")) {
44  return resultMap.get("sld");
45  }
46  return null;
47  }
static Map< String, ResultStyleFormatter > resultMap
Definition: ResultStyleFormatter.java:16

Member Data Documentation

◆ exposedType

String exposedType ="application/vnd.geo+json"
inherited

Referenced by SLDFormatter.formatter().

◆ lastQueriedElemCount

Integer lastQueriedElemCount =0
inherited

◆ mimeType

String mimeType ="text/plain"
inherited

◆ resultMap

Map<String,ResultStyleFormatter> resultMap =new TreeMap<String, ResultStyleFormatter>()
staticinherited

◆ styleAttribute