Class EditConfigurationVTwo


  • public class EditConfigurationVTwo
    extends Object
    Represents a set of fields on a form and how parameters from a from submission should be manipulated to create N3. Uris in urisInScope and urisOnForm should not have any quoting or escaping. Literals in literalsOnForm and literalsInScope should be escaped and quoted in preparation for N3. They may also be appended with a datatype or lang.
    • Field Detail

      • isParamUpdate

        public boolean isParamUpdate
    • Constructor Detail

      • EditConfigurationVTwo

        public EditConfigurationVTwo()
    • Method Detail

      • addSystemValues

        public void addSystemValues​(org.apache.jena.rdf.model.Model model,
                                    javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.ServletContext context)
        Add symbols for things like currentTime and editingUser to editConfig.urisInScope and editConfig.literalsInScope.
      • basicPrepare

        protected void basicPrepare()
      • prepareForDataPropUpdate

        public void prepareForDataPropUpdate​(org.apache.jena.rdf.model.Model model,
                                             DataPropertyDao dataPropertyDao)
        Prepare an EditConfiguration for a DataProperty update. This should only be used when editing a existing data property statement.
      • prepareForObjPropUpdate

        public void prepareForObjPropUpdate​(org.apache.jena.rdf.model.Model model)
        Prepare for a ObjectProperty update. Run SPARQL for existing values. This can be used for an object property or a direct form.
      • prepareForParamUpdate

        public void prepareForParamUpdate​(org.apache.jena.rdf.model.Model model)
        Prepare for a param update: Run SPARQL for existing values. This can be used for a direct form which does not correspond directly to either data or object property form.
      • prepareForNonUpdate

        public void prepareForNonUpdate​(org.apache.jena.rdf.model.Model model)
        Run SPARQL for Additional values. This can be used for a data property, an object property or a direct form.
      • runSparqlForAdditional

        public void runSparqlForAdditional​(SparqlEvaluateVTwo sparqlEval)
        Runs the queries for additional uris and literals then add those back into the urisInScope and literalsInScope.
      • runSparqlForExisting

        public void runSparqlForExisting​(SparqlEvaluateVTwo sparqlEval)
      • getN3Required

        public List<String> getN3Required()
        Return a copy of the value so that the configuration is not modified by external code.
      • setN3Required

        public void setN3Required​(List<String> n3Required)
      • setN3Required

        public void setN3Required​(String... n3RequiredStrs)
      • addN3Required

        public void addN3Required​(List<String> n3RequiredInput)
      • addN3Required

        public void addN3Required​(String... n3RequiredStrsInput)
      • getN3Optional

        public List<String> getN3Optional()
        return a copy of the value so that the configuration is not modified by external code.
      • setN3Optional

        public void setN3Optional​(List<String> n3Optional)
      • setN3Optional

        public void setN3Optional​(String... n3Strs)
      • addN3Optional

        public void addN3Optional​(List<String> n3Optional)
      • addN3Optional

        public void addN3Optional​(String... n3Strs)
      • setNewResources

        public void setNewResources​(Map<String,​String> newResources)
      • setNewResources

        public void setNewResources​(String... strs)
      • getUrisOnform

        public List<String> getUrisOnform()
      • setUrisOnform

        public void setUrisOnform​(List<String> urisOnform)
      • setUrisOnForm

        public void setUrisOnForm​(String... strs)
      • addUrisOnForm

        public void addUrisOnForm​(List<String> urisOnform)
      • addUrisOnForm

        public void addUrisOnForm​(String... strs)
      • setFilesOnForm

        public void setFilesOnForm​(List<String> filesOnForm)
      • getFilesOnForm

        public List<String> getFilesOnForm()
      • getLiteralsOnForm

        public List<String> getLiteralsOnForm()
      • setLiteralsOnForm

        public void setLiteralsOnForm​(List<String> literalsOnForm)
      • setLiteralsOnForm

        public void setLiteralsOnForm​(String... strs)
      • addLiteralsOnForm

        public void addLiteralsOnForm​(List<String> literalsOnForm)
      • addLiteralsOnForm

        public void addLiteralsOnForm​(String... strs)
      • getLiteralsInScope

        public Map<String,​List<org.apache.jena.rdf.model.Literal>> getLiteralsInScope()
      • setLiteralsInScope

        public void setLiteralsInScope​(Map<String,​List<org.apache.jena.rdf.model.Literal>> literalsInScope)
      • getSparqlForAdditionalUrisInScope

        public Map<String,​String> getSparqlForAdditionalUrisInScope()
        Return a copy of the value so that the configuration is not modified by external code.
      • setSparqlForAdditionalUrisInScope

        public void setSparqlForAdditionalUrisInScope​(Map<String,​String> sparqlForAdditionalUrisInScope)
      • getSparqlForAdditionalLiteralsInScope

        public Map<String,​String> getSparqlForAdditionalLiteralsInScope()
        Return a copy of the value so that the configuration is not modified by external code.
      • setSparqlForAdditionalLiteralsInScope

        public void setSparqlForAdditionalLiteralsInScope​(Map<String,​String> sparqlForAdditionalLiteralsInScope)
      • getEntityToReturnTo

        public String getEntityToReturnTo()
      • setEntityToReturnTo

        public void setEntityToReturnTo​(String entityToReturnTo)
      • getUrlPatternToReturnTo

        public String getUrlPatternToReturnTo()
      • setUrlPatternToReturnTo

        public void setUrlPatternToReturnTo​(String s)
      • getSparqlForExistingLiterals

        public Map<String,​String> getSparqlForExistingLiterals()
        return a copy of the value so that the configuration is not modified by external code.
      • setSparqlForExistingLiterals

        public void setSparqlForExistingLiterals​(Map<String,​String> sparqlForExistingLiterals)
      • getSparqlForExistingUris

        public Map<String,​String> getSparqlForExistingUris()
        return a copy of the value so that the configuration is not modified by external code.
      • setSparqlForExistingUris

        public void setSparqlForExistingUris​(Map<String,​String> sparqlForExistingUris)
      • clearAllConfigsInSession

        public static void clearAllConfigsInSession​(javax.servlet.http.HttpSession sess)
      • clearEditConfigurationInSession

        public static void clearEditConfigurationInSession​(javax.servlet.http.HttpSession session,
                                                           EditConfigurationVTwo editConfig)
      • putConfigInSession

        public static void putConfigInSession​(EditConfigurationVTwo ec,
                                              javax.servlet.http.HttpSession sess)
      • getConfigFromSession

        public static EditConfigurationVTwo getConfigFromSession​(javax.servlet.http.HttpSession sess,
                                                                 String editKey)
      • getConfigFromSession

        public static EditConfigurationVTwo getConfigFromSession​(javax.servlet.http.HttpSession sess,
                                                                 javax.servlet.http.HttpServletRequest request)
        This may return null, which indicates that there is no editKey or EditConfiguration in the request or session. If the queryParams are supplied, look for the editKey there first since multipart parsing might have cleared them from the request.
      • getEditKeyFromRequest

        public static String getEditKeyFromRequest​(javax.servlet.ServletRequest request)
        The editKey can be a HTTP query parameter or it can be a request attribute.
      • newEditKey

        public static String newEditKey​(javax.servlet.http.HttpSession sess)
      • getObject

        public String getObject()
      • setObject

        public void setObject​(String object)
      • isObjectResource

        public boolean isObjectResource()
      • getDatapropKey

        public Integer getDatapropKey()
      • setDatapropKey

        public void setDatapropKey​(Integer datapropKey)
      • getSubjectUri

        public String getSubjectUri()
      • setSubjectUri

        public void setSubjectUri​(String subjectUri)
      • getPredicateUri

        public String getPredicateUri()
      • setPredicateUri

        public void setPredicateUri​(String predicateUri)
      • getEditKey

        public String getEditKey()
      • setEditKey

        public void setEditKey​(String editKey)
      • getFormUrl

        public String getFormUrl()
      • setFormUrl

        public void setFormUrl​(String formUrl)
      • getVarNameForSubject

        public String getVarNameForSubject()
      • setVarNameForSubject

        public void setVarNameForSubject​(String varName)
      • getVarNameForPredicate

        public String getVarNameForPredicate()
      • setVarNameForPredicate

        public void setVarNameForPredicate​(String varName)
      • getVarNameForObject

        public String getVarNameForObject()
      • setVarNameForObject

        public void setVarNameForObject​(String varName)
      • isUseDependentResourceDelete

        public boolean isUseDependentResourceDelete()
        If this is set to true, then dependent resources should be deleted on edits that remove the parent resource.
      • setUseDependentResourceDelete

        public void setUseDependentResourceDelete​(boolean useDependentResourceDelete)
        If this is set to true, then dependent resources should be deleted on edits that remove the parent resource.
      • addModelChangePreprocessor

        public void addModelChangePreprocessor​(ModelChangePreprocessor modelChangePreprocessor)
      • setProhibitedFromSearch

        public void setProhibitedFromSearch​(ProhibitedFromSearch prohibitedFromSearch)
      • getWriteModelSelector

        public ModelSelector getWriteModelSelector()
      • setWriteModelSelector

        public void setWriteModelSelector​(ModelSelector writeModel)
      • getQueryModelSelector

        public ModelSelector getQueryModelSelector()
      • setQueryModelSelector

        public void setQueryModelSelector​(ModelSelector queryModel)
      • getWdfSelectorForOptons

        public WDFSelector getWdfSelectorForOptons()
      • setWdfSelectorForOptons

        public void setWdfSelectorForOptons​(WDFSelector wdfForOptons)
      • getResourceModelSelector

        public ModelSelector getResourceModelSelector()
      • setResourceModelSelector

        public void setResourceModelSelector​(ModelSelector resourceModelSelector)
      • setTemplate

        public void setTemplate​(String template)
      • getTemplate

        public String getTemplate()
      • getSubmitToUrl

        public String getSubmitToUrl()
      • setSubmitToUrl

        public void setSubmitToUrl​(String submitToUrl)
      • isUpdate

        public boolean isUpdate()
      • isObjectPropertyUpdate

        public boolean isObjectPropertyUpdate()
      • isDataPropertyUpdate

        public boolean isDataPropertyUpdate()
      • setParamUpdate

        public void setParamUpdate​(boolean inputParamUpdate)
      • isParamUpdate

        public boolean isParamUpdate()
      • setFormSpecificData

        public void setFormSpecificData​(HashMap<String,​Object> formSpecificData)
        This is for specific data for a form that will be set by the generator.
      • addFormSpecificData

        public void addFormSpecificData​(String key,
                                        Object value)
      • hasBeenPreparedForUpdate

        public boolean hasBeenPreparedForUpdate()
      • addNewResource

        public void addNewResource​(String key,
                                   String namespace)
      • addSparqlForExistingLiteral

        public void addSparqlForExistingLiteral​(String key,
                                                String sparql)
      • addSparqlForExistingUris

        public void addSparqlForExistingUris​(String key,
                                             String sparql)
      • addSparqlForAdditionalLiteralsInScope

        public void addSparqlForAdditionalLiteralsInScope​(String key,
                                                          String sparql)
      • addSparqlForAdditionalUrisInScope

        public void addSparqlForAdditionalUrisInScope​(String key,
                                                      String sparql)
      • addField

        public void addField​(FieldVTwo field)
      • setUrlToReturnTo

        public void setUrlToReturnTo​(String url)
      • getUrlToReturnTo

        public String getUrlToReturnTo()
      • setSkipToUrl

        public void setSkipToUrl​(String url)
      • getSkipToUrl

        public String getSkipToUrl()
      • setWriteModelId

        public void setWriteModelId​(String writeModelId)
      • getWriteModelId

        public String getWriteModelId()
      • setAboxModelId

        public void setAboxModelId​(String aboxModelId)
      • getAboxModelId

        public String getAboxModelId()
      • setTboxModelId

        public void setTboxModelId​(String tboxModelId)
      • getTboxModelId

        public String getTboxModelId()