Skip to content

REST Conversion Notes

Devon Tucker edited this page Mar 16, 2017 · 1 revision

REST Notes

Existing Serialization

Existing serialization is handled through XStream, Format objects and various customizations.

The XStream writer itself has various customizations. See ReflectiveResource.configureXStream

JSON

Handled by ReflectiveJSONFormat.java in gs-rest

ReflectiveJSONFormat is further customized in:

ResourceResource.java processes the Resource annotations and configures the AtomLink.

ReflectiveJSONFormat jsonFormat = new ReflectiveJSONFormat();
AtomLink.configureJSON(jsonFormat.getXStream());
jsonFormat.getXStream().processAnnotations(ResourceChild.class);
jsonFormat.getXStream().processAnnotations(ResourceMetadata.class);
jsonFormat.getXStream().processAnnotations(ResourceDirectory.class);
formats.add(jsonFormat);

AbstractCatalogListResource.java

HTML

HTML serialization is handled via ReflectiveHTMLFormat.java

Styles

/styles

  • GET
    • Get all layers
    • Handled by StyleListResource.java
    • Attributes
      • layer: get styles associated with a layer
      • workspace: get styles associated with a workspace
Clone this wiki locally