Package nl.tailormap.viewer.config.app
Class ApplicationLayer
- java.lang.Object
-
- nl.tailormap.viewer.config.app.ApplicationLayer
-
@Entity public class ApplicationLayer extends Object
- Author:
- Matthijs Laan
-
-
Constructor Summary
Constructors Constructor Description ApplicationLayer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttributesJSON(org.json.JSONObject json, boolean includeRelations, javax.persistence.EntityManager em)voidaddLayerListDetails(org.json.JSONObject json, Layer l)ConfiguredAttributegetAttribute(SimpleFeatureType sft, String name)List<ConfiguredAttribute>getAttributes()List<ConfiguredAttribute>getAttributes(SimpleFeatureType sft)Get all the attributes from this applicationLayer that are from the given SimpleFeatureType (or the SimpleFeatureType == null, for configured attributes that don't have a SimpleFeatureType set yet).List<ConfiguredAttribute>getAttributes(SimpleFeatureType sft, boolean includeJoined)Map<String,ClobElement>getDetails()StringgetDisplayName(javax.persistence.EntityManager em)LonggetId()org.json.JSONArraygetInvertedRelationsJSON(Layer layer, javax.persistence.EntityManager em)Get all the relations of featuretypes that have this applayer as dependend n - 1 (n are other featuretypes, 1 = current layer)StringgetLayerName()Set<String>getReaders()org.json.JSONArraygetRelationsJSON(Layer layer)Get relations of this applayer to other featuretypes: 1-n (1 = current applayer, n are the relationsGeoServicegetService()Map<Application,StartLayer>getStartLayers()Set<String>getWriters()voidsetAttributes(List<ConfiguredAttribute> attributes)voidsetDetails(Map<String,ClobElement> details)voidsetId(Long id)voidsetLayerName(String layerName)voidsetReaders(Set<String> readers)voidsetService(GeoService service)voidsetStartLayers(Map<Application,StartLayer> startLayers)voidsetWriters(Set<String> writers)org.json.JSONObjecttoJSONObject(boolean includeAttributes, boolean includeRelations, javax.persistence.EntityManager em, Application app)org.json.JSONObjecttoJSONObject(javax.persistence.EntityManager em)StringtoString()
-
-
-
Method Detail
-
getAttributes
public List<ConfiguredAttribute> getAttributes()
-
setAttributes
public void setAttributes(List<ConfiguredAttribute> attributes)
-
getDetails
public Map<String,ClobElement> getDetails()
-
setDetails
public void setDetails(Map<String,ClobElement> details)
-
getId
public Long getId()
-
setId
public void setId(Long id)
-
getService
public GeoService getService()
-
setService
public void setService(GeoService service)
-
getLayerName
public String getLayerName()
-
setLayerName
public void setLayerName(String layerName)
-
getStartLayers
public Map<Application,StartLayer> getStartLayers()
-
setStartLayers
public void setStartLayers(Map<Application,StartLayer> startLayers)
-
getAttributes
public List<ConfiguredAttribute> getAttributes(SimpleFeatureType sft)
Get all the attributes from this applicationLayer that are from the given SimpleFeatureType (or the SimpleFeatureType == null, for configured attributes that don't have a SimpleFeatureType set yet). Optional the joined SimpleFeatureType attributes that are joined can be added (includeJoined=true)- Parameters:
sft- the type to get the attributes- Returns:
- list of configured attributes
-
getAttributes
public List<ConfiguredAttribute> getAttributes(SimpleFeatureType sft, boolean includeJoined)
-
getAttribute
public ConfiguredAttribute getAttribute(SimpleFeatureType sft, String name)
-
getDisplayName
public String getDisplayName(javax.persistence.EntityManager em)
-
toJSONObject
public org.json.JSONObject toJSONObject(javax.persistence.EntityManager em) throws org.json.JSONException- Throws:
org.json.JSONException
-
toJSONObject
public org.json.JSONObject toJSONObject(boolean includeAttributes, boolean includeRelations, javax.persistence.EntityManager em, Application app) throws org.json.JSONException- Throws:
org.json.JSONException
-
addLayerListDetails
public void addLayerListDetails(org.json.JSONObject json, Layer l)
-
addAttributesJSON
public void addAttributesJSON(org.json.JSONObject json, boolean includeRelations, javax.persistence.EntityManager em) throws org.json.JSONException- Throws:
org.json.JSONException
-
getRelationsJSON
public org.json.JSONArray getRelationsJSON(Layer layer) throws org.json.JSONException
Get relations of this applayer to other featuretypes: 1-n (1 = current applayer, n are the relations- Parameters:
layer- Layer for which relations must be retrievd- Returns:
- JSONArray with relations
- Throws:
org.json.JSONException- when an exception occurs
-
getInvertedRelationsJSON
public org.json.JSONArray getInvertedRelationsJSON(Layer layer, javax.persistence.EntityManager em) throws org.json.JSONException
Get all the relations of featuretypes that have this applayer as dependend n - 1 (n are other featuretypes, 1 = current layer)- Parameters:
layer- Layer for which relations must be retrievdem- EntityManager used for retrieving the inverted relations- Returns:
- JSONArray with relations
- Throws:
org.json.JSONException- when an exception occurs
-
-