package eu.simstadt.nf4j; /** * A layer describes an aspect of a nF product and the type of its data. For instance, a layer could contain * all house numbers of all buildings of the product. * * @author Marcel Bruse */ public class Layer { private static final String DEFAULT_NAME = "GML"; private static final String DEFAULT_PRODUCT = "WU3"; private static final String DEFAULT_STYLE = "#000000"; /** The name of the layer. */ private String name; /** The name of the product to which this layer belongs. */ private String product; /** The style of this layer. Should be a color code (?). */ private String style; /** * The standard constructor. */ public Layer() {} /** * A convenience constructor for layers. * * @param name The name of the layer. This layer has to exist within the product. * @param product The name of the product. This product has to exist in the database. * @param style The purpose of this field is unknown. */ public Layer(String name, String product, String style) { this.name = name; this.product = product; this.style = style; } /** * @return Returns the name of the layer. */ public String getName() { return name; } /** * Sets the name of the layer. * * @param name The name of the layer. */ public void setName(String name) { this.name = name; } /** * @return Returns the name of the layer's product. */ public String getProduct() { return product; } /** * Sets the product of this layer. * * @param product The product of this layer. */ public void setProduct(String product) { this.product = product; } /** * @return Returns the style of the layer. */ public String getStyle() { return style; } /** * Sets the style of this layer. Should be a color code (?). * * @param style The style of this layer. */ public void setStyle(String style) { this.style = style; } public static Layer getDefaultLayer() { Layer layer = new Layer(); layer.setName(DEFAULT_NAME); layer.setProduct(DEFAULT_PRODUCT); layer.setStyle(DEFAULT_STYLE); return layer; } }