Ignore:
Timestamp:
02/13/14 14:42:31 (10 years ago)
Author:
twagoo
Message:

Written marshaller/unmarshaller for VloConfig?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.0/vlo-commons/src/main/java/eu/clarin/cmdi/vlo/config/VloConfig.java

    r4507 r4509  
    44import java.net.URLEncoder;
    55import java.util.List;
    6 import org.simpleframework.xml.Root;
     6import javax.xml.bind.annotation.XmlElement;
     7import javax.xml.bind.annotation.XmlElementWrapper;
     8import javax.xml.bind.annotation.XmlRootElement;
    79
    810/**
     
    1113 * @author keeloo, twagoo
    1214 */
    13 @Root
     15@XmlRootElement(name = "VloConfig")
    1416public class VloConfig {
    1517
     
    4143    private int solrTimeOut = 0;
    4244
    43     private List<DataRoot> dataRoots;
     45    @XmlElementWrapper(name="dataRoots")
     46    @XmlElement(name="DataRoot")
     47    private List<DataRoot> dataRoot;
    4448
    4549    private int maxFileSize = 0;
     
    6771
    6872    // services
    69     private String FederatedContentSearchUrl = "";
     73    private String federatedContentSearchUrl = "";
    7074
    7175    private boolean useHandleResolver = false;
    7276
     77    @XmlElement
    7378    private String profileSchemaUrl = "";
    7479
     
    7782    private String handleServerUrl = "";
    7883
     84    @XmlElement
    7985    private String imdiBrowserUrl = "";
    8086
     
    9399     * An array of facetFields<br><br>
    94100     *
    95      * In case of an array of elements, the number of elements in the array
    96      * needs to be communicated to the Simple framework. The following would be
    97      * a correct description of an array of three facet fields<br><br>
    98      *
    99      * {@literal <facetFields length="3">}<br> {@literal    <facetField>}<br>
    100      * {@literal       fieldOne}<br> {@literal    </facetField>}<br>
    101      * {@literal    <facetField>}<br> {@literal       fieldTwo}<br>
    102      * {@literal    </facetField>}<br> {@literal    <facetField>}<br>
    103      * {@literal       fieldThree}<br> {@literal    </facetField>}<br>
    104      * {@literal </facetFields>}<br><br>
    105      *
    106      * To let Simple now it has to interpret the facetFields element as an
    107      * array, use the ElementArray directive. Use the directive to let Simple
    108      * know that the elements inside 'facetFields' are named 'facetField'.
    109      */
    110     //Array(entry = "facetField")
    111     private String[] facetFields = {"", "", ""};
     101     * To let JAXB know it has to interpret the facetFields element as an array,
     102     * use the XmlElementWrapper directive. Use the directive to let JAXB know
     103     * that the elements inside 'facetFields' are named 'facetField'.
     104     */
     105    @XmlElementWrapper(name = "facetFields")
     106    private String[] facetField = {"", "", ""};
    112107
    113108    // test related parameters
     
    182177     * @return the value
    183178     */
    184     public boolean deleteAllFirst() {
     179    public boolean getDeleteAllFirst() {
    185180        return deleteAllFirst;
    186181    }
     
    351346     */
    352347    public List<DataRoot> getDataRoots() {
    353         return dataRoots;
     348        return dataRoot;
    354349    }
    355350
     
    363358     */
    364359    public void setDataRoots(List<DataRoot> param) {
    365         dataRoots = param;
     360        dataRoot = param;
    366361    }
    367362
     
    506501     * @param param the value
    507502     */
    508     public void setProfileSchemaUrl(String param) {
     503    public void setComponentRegistryProfileSchema(String param) {
    509504        profileSchemaUrl = param;
    510505    }
     
    567562     * @return the value
    568563     */
    569     public String getIMDIBrowserUrl(String handle) {
     564    public String getImdiBrowserUrl(String handle) {
    570565        String result;
    571566        try {
     
    585580     * @param param the value
    586581     */
    587     public void setIMDIBrowserUrl(String param) {
     582    public void setImdiBrowserUrl(String param) {
    588583        imdiBrowserUrl = param;
    589584    }
     
    645640     * @return the value
    646641     */
     642    @XmlElement(name = "FederatedContentSearchUrl")
    647643    public String getFederatedContentSearchUrl() {
    648         return FederatedContentSearchUrl;
     644        return federatedContentSearchUrl;
    649645    }
    650646
     
    658654     */
    659655    public void setFederatedContentSearchUrl(String param) {
    660         FederatedContentSearchUrl = param;
     656        federatedContentSearchUrl = param;
    661657    }
    662658
     
    694690     */
    695691    public String[] getFacetFields() {
    696         return facetFields;
     692        return facetField;
    697693    }
    698694
     
    706702     */
    707703    public void setFacetFields(String[] param) {
    708         facetFields = param;
     704        facetField = param;
    709705    }
    710706
Note: See TracChangeset for help on using the changeset viewer.