Class ApplicationLayer


  • @Entity
    public class ApplicationLayer
    extends Object
    Author:
    Matthijs Laan
    • Constructor Detail

      • ApplicationLayer

        public ApplicationLayer()
    • Method Detail

      • getId

        public Long getId()
      • setId

        public void setId​(Long id)
      • getReaders

        public Set<String> getReaders()
      • setReaders

        public void setReaders​(Set<String> readers)
      • getWriters

        public Set<String> getWriters()
      • setWriters

        public void setWriters​(Set<String> writers)
      • setService

        public void setService​(GeoService service)
      • getLayerName

        public String getLayerName()
      • setLayerName

        public void setLayerName​(String layerName)
      • 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
      • 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 retrievd
        em - EntityManager used for retrieving the inverted relations
        Returns:
        JSONArray with relations
        Throws:
        org.json.JSONException - when an exception occurs