Class ObjectPropertyTemplateModel

    • Method Detail

      • setAddUrl

        protected void setAddUrl()
      • getFreemarkerTemplateLoader

        protected freemarker.cache.TemplateLoader getFreemarkerTemplateLoader()
        Pull this into a protected method so we can stub it out in the unit tests. Other options: 1) receive a TemplateLoader into the constructor of ObjectPropertyTemplateModel, 2) provide a service that will check to see whether a given template name is valid, 3) skip the test for valid template name until we try to use the thing. This will do for now.
      • getUnfilteredStatementData

        protected List<Map<String,​String>> getUnfilteredStatementData()
      • isEmpty

        protected abstract boolean isEmpty()
      • getPublicDescription

        public String getPublicDescription()
      • getTemplateName

        protected String getTemplateName()
      • hasDefaultListView

        protected boolean hasDefaultListView()
      • getImageUploadUrl

        protected static String getImageUploadUrl​(String subjectUri,
                                                  String action)
      • postprocess

        protected void postprocess​(List<Map<String,​String>> data)
        Apply post-processing to query results to prepare for template
      • removeDuplicates

        protected void removeDuplicates​(List<Map<String,​String>> data)
        The SPARQL query results may contain duplicate rows for a single object, if there are multiple solutions to the entire query. Remove duplicates here by arbitrarily selecting only the first row returned.
        Parameters:
        data - The data to deduplicate
      • getObjectKey

        protected String getObjectKey()
      • isAuthorizedToDisplay

        protected boolean isAuthorizedToDisplay​(VitroRequest vreq,
                                                String objectUri)
      • getTemplate

        public String getTemplate()
      • isCollatedBySubclass

        public abstract boolean isCollatedBySubclass()
      • isFileStoreProperty

        protected static boolean isFileStoreProperty​(Property property)
      • getDeleteFileUrl

        public static String getDeleteFileUrl​(String subjectUri,
                                              String predicateUri,
                                              String objectUri)