cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Mon, 26 Dec 2022 20:54:08 +0000 (21:54 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Mon, 26 Dec 2022 20:54:08 +0000 (21:54 +0100)
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/controller/oaipmh/TaxonOaiPmhController.java
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/oaipmh/ResumptionToken.java

index 019182821330e71dadb167b6ca8c5236f6f0d84f..3a5cf8b14cd9a3752e26b6212caa4a797cf522f6 100644 (file)
@@ -1,60 +1,60 @@
-/**\r
-* Copyright (C) 2009 EDIT\r
-* European Distributed Institute of Taxonomy\r
-* http://www.e-taxonomy.eu\r
-*\r
-* The contents of this file are subject to the Mozilla Public License Version 1.1\r
-* See LICENSE.TXT at the top of this package for the full license terms.\r
-*/\r
-package eu.etaxonomy.cdm.remote.controller.oaipmh;\r
-\r
-import java.util.ArrayList;\r
-import java.util.HashSet;\r
-import java.util.List;\r
-import java.util.Set;\r
-\r
-import org.springframework.beans.factory.annotation.Autowired;\r
-import org.springframework.stereotype.Controller;\r
-import org.springframework.web.bind.annotation.RequestMapping;\r
-import org.springframework.web.servlet.ModelAndView;\r
-\r
-import eu.etaxonomy.cdm.api.service.ITaxonService;\r
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;\r
-import eu.etaxonomy.cdm.remote.dto.oaipmh.SetSpec;\r
-import io.swagger.annotations.Api;\r
-\r
-@Controller\r
-@Api("OAI-PMH Taxa")\r
-@RequestMapping(value = "/taxon/oai", params = "verb")\r
-public class TaxonOaiPmhController extends AbstractOaiPmhController<TaxonBase, ITaxonService> {\r
-\r
-    @Override\r
-    protected List<String> getPropertyPaths() {\r
-        List<String> propertyPaths = new ArrayList<String>();\r
-        propertyPaths.add("createdBy");\r
-        propertyPaths.add("updatedBy");\r
-        propertyPaths.add("name.titleCache");\r
-        propertyPaths.add("secSource.citation");\r
-        propertyPaths.add("relationsToThisTaxon");\r
-        propertyPaths.add("relationsToThisTaxon.fromTaxon");\r
-        propertyPaths.add("relationsToThisTaxon.toTaxon");\r
-        propertyPaths.add("relationsToThisTaxon.type");\r
-        propertyPaths.add("synonyms");\r
-        propertyPaths.add("descriptions");\r
-        return propertyPaths;\r
-    }\r
-\r
-    @Override\r
-    protected void addSets(ModelAndView modelAndView) {\r
-        Set<SetSpec> sets = new HashSet<SetSpec>();\r
-        sets.add(SetSpec.TAXON);\r
-        sets.add(SetSpec.SYNONYM);\r
-        modelAndView.addObject("sets",sets);\r
-    }\r
-\r
-    @Override\r
-    @Autowired\r
-    public void setService(ITaxonService service) {\r
-        this.service = service;\r
-    }\r
-}\r
+/**
+* Copyright (C) 2009 EDIT
+* European Distributed Institute of Taxonomy
+* http://www.e-taxonomy.eu
+*
+* The contents of this file are subject to the Mozilla Public License Version 1.1
+* See LICENSE.TXT at the top of this package for the full license terms.
+*/
+package eu.etaxonomy.cdm.remote.controller.oaipmh;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+import eu.etaxonomy.cdm.api.service.ITaxonService;
+import eu.etaxonomy.cdm.model.taxon.TaxonBase;
+import eu.etaxonomy.cdm.remote.dto.oaipmh.SetSpec;
+import io.swagger.annotations.Api;
+
+@Controller
+@Api("OAI-PMH Taxa")
+@RequestMapping(value = "/taxon/oai", params = "verb")
+public class TaxonOaiPmhController extends AbstractOaiPmhController<TaxonBase, ITaxonService> {
+
+    @Override
+    protected List<String> getPropertyPaths() {
+        List<String> propertyPaths = new ArrayList<String>();
+        propertyPaths.add("createdBy");
+        propertyPaths.add("updatedBy");
+        propertyPaths.add("name.titleCache");
+        propertyPaths.add("secSource.citation");
+        propertyPaths.add("relationsToThisTaxon");
+        propertyPaths.add("relationsToThisTaxon.fromTaxon");
+        propertyPaths.add("relationsToThisTaxon.toTaxon");
+        propertyPaths.add("relationsToThisTaxon.type");
+        propertyPaths.add("synonyms");
+        propertyPaths.add("descriptions");
+        return propertyPaths;
+    }
+
+    @Override
+    protected void addSets(ModelAndView modelAndView) {
+        Set<SetSpec> sets = new HashSet<SetSpec>();
+        sets.add(SetSpec.TAXON);
+        sets.add(SetSpec.SYNONYM);
+        modelAndView.addObject("sets",sets);
+    }
+
+    @Override
+    @Autowired
+    public void setService(ITaxonService service) {
+        this.service = service;
+    }
+}
index 754a8496839725057a33537172ca3e75d1b9744a..685d865e33cb20dfae5fd35f9798881e118f7132 100644 (file)
-//\r
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs \r
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> \r
-// Any modifications to this file will be lost upon recompilation of the source schema. \r
-// Generated on: 2009.11.02 at 12:58:05 PM GMT \r
-//\r
-\r
-\r
-package eu.etaxonomy.cdm.remote.dto.oaipmh;\r
-\r
-import java.io.Serializable;\r
-import java.math.BigInteger;\r
-import java.util.UUID;\r
-\r
-import javax.xml.bind.annotation.XmlAccessType;\r
-import javax.xml.bind.annotation.XmlAccessorType;\r
-import javax.xml.bind.annotation.XmlAttribute;\r
-import javax.xml.bind.annotation.XmlSchemaType;\r
-import javax.xml.bind.annotation.XmlTransient;\r
-import javax.xml.bind.annotation.XmlType;\r
-import javax.xml.bind.annotation.XmlValue;\r
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;\r
-import javax.xml.datatype.XMLGregorianCalendar;\r
-\r
-import org.joda.time.DateTime;\r
-\r
-import eu.etaxonomy.cdm.api.service.pager.Pager;\r
-import eu.etaxonomy.cdm.jaxb.DateTimeAdapter;\r
-\r
-\r
-/**\r
- * A resumptionToken may have 3 optional attributes\r
- *        and can be used in ListSets, ListIdentifiers, ListRecords\r
- *        responses.\r
- * \r
- * <p>Java class for resumptionTokenType complex type.\r
- * \r
- * <p>The following schema fragment specifies the expected content contained within this class.\r
- * \r
- * <pre>\r
- * &lt;complexType name="resumptionTokenType">\r
- *   &lt;simpleContent>\r
- *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">\r
- *       &lt;attribute name="expirationDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" />\r
- *       &lt;attribute name="completeListSize" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />\r
- *       &lt;attribute name="cursor" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />\r
- *     &lt;/extension>\r
- *   &lt;/simpleContent>\r
- * &lt;/complexType>\r
- * </pre>\r
- * \r
- * \r
- */\r
-@XmlAccessorType(XmlAccessType.FIELD)\r
-@XmlType(name = "resumptionTokenType", propOrder = {\r
-    "value"\r
-})\r
-public class ResumptionToken implements Serializable {\r
-\r
-    /**\r
-        * \r
-        */\r
-       private static final long serialVersionUID = 1L;\r
-       \r
-    @XmlValue\r
-    protected String value;\r
-    @XmlAttribute\r
-    @XmlJavaTypeAdapter(DateTimeAdapter.class)\r
-    protected DateTime expirationDate;\r
-    @XmlAttribute\r
-    @XmlSchemaType(name = "positiveInteger")\r
-    protected BigInteger completeListSize;\r
-    @XmlAttribute\r
-    @XmlSchemaType(name = "nonNegativeInteger")\r
-    protected BigInteger cursor;\r
-    \r
-    @XmlTransient\r
-       private MetadataPrefix metadataPrefix;\r
-    \r
-    @XmlTransient\r
-       private DateTime from;\r
-    \r
-    @XmlTransient\r
-       private DateTime until;\r
-    \r
-    @XmlTransient\r
-       private SetSpec set;\r
-\r
-    public ResumptionToken(Pager results, DateTime from,\r
-                       DateTime until, MetadataPrefix metadataPrefix, SetSpec set) {\r
-               this.from = from;\r
-               this.until = until;\r
-               this.metadataPrefix = metadataPrefix;\r
-               this.set = set;\r
-               this.value = UUID.randomUUID().toString();\r
-               this.completeListSize = BigInteger.valueOf(results.getCount());\r
-               this.cursor = BigInteger.valueOf(results.getPageSize() * results.getCurrentIndex());\r
-       }\r
-\r
-       public ResumptionToken() { }\r
-\r
-       /**\r
-     * Gets the value of the value property.\r
-     * \r
-     * @return\r
-     *     possible object is\r
-     *     {@link String }\r
-     *     \r
-     */\r
-    public String getValue() {\r
-        return value;\r
-    }\r
-\r
-    /**\r
-     * Sets the value of the value property.\r
-     * \r
-     * @param value\r
-     *     allowed object is\r
-     *     {@link String }\r
-     *     \r
-     */\r
-    public void setValue(String value) {\r
-        this.value = value;\r
-    }\r
-\r
-    /**\r
-     * Gets the value of the expirationDate property.\r
-     * \r
-     * @return\r
-     *     possible object is\r
-     *     {@link XMLGregorianCalendar }\r
-     *     \r
-     */\r
-    public DateTime getExpirationDate() {\r
-        return expirationDate;\r
-    }\r
-\r
-    /**\r
-     * Sets the value of the expirationDate property.\r
-     * \r
-     * @param value\r
-     *     allowed object is\r
-     *     {@link XMLGregorianCalendar }\r
-     *     \r
-     */\r
-    public void setExpirationDate(DateTime value) {\r
-        this.expirationDate = value;\r
-    }\r
-\r
-    /**\r
-     * Gets the value of the completeListSize property.\r
-     * \r
-     * @return\r
-     *     possible object is\r
-     *     {@link BigInteger }\r
-     *     \r
-     */\r
-    public BigInteger getCompleteListSize() {\r
-        return completeListSize;\r
-    }\r
-\r
-    /**\r
-     * Sets the value of the completeListSize property.\r
-     * \r
-     * @param value\r
-     *     allowed object is\r
-     *     {@link BigInteger }\r
-     *     \r
-     */\r
-    public void setCompleteListSize(BigInteger value) {\r
-        this.completeListSize = value;\r
-    }\r
-\r
-    /**\r
-     * Gets the value of the cursor property.\r
-     * \r
-     * @return\r
-     *     possible object is\r
-     *     {@link BigInteger }\r
-     *     \r
-     */\r
-    public BigInteger getCursor() {\r
-        return cursor;\r
-    }\r
-\r
-    /**\r
-     * Sets the value of the cursor property.\r
-     * \r
-     * @param value\r
-     *     allowed object is\r
-     *     {@link BigInteger }\r
-     *     \r
-     */\r
-    public void setCursor(BigInteger value) {\r
-        this.cursor = value;\r
-    }\r
-\r
-       public MetadataPrefix getMetadataPrefix() {\r
-               return metadataPrefix;\r
-       }\r
-\r
-       public DateTime getFrom() {\r
-               return from;\r
-       }\r
-\r
-       public DateTime getUntil() {\r
-               return until;\r
-       }\r
-\r
-       public SetSpec getSet() {\r
-               return set;\r
-       }\r
-       \r
-       public void updateResults(Pager results) {\r
-               this.completeListSize = BigInteger.valueOf(results.getCount());\r
-               this.cursor = BigInteger.valueOf(results.getPageSize() * results.getCurrentIndex());\r
-       }\r
-\r
-       public static ResumptionToken emptyResumptionToken() {\r
-               return new ResumptionToken();\r
-       }\r
-}\r
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs 
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
+// Any modifications to this file will be lost upon recompilation of the source schema. 
+// Generated on: 2009.11.02 at 12:58:05 PM GMT 
+//
+
+
+package eu.etaxonomy.cdm.remote.dto.oaipmh;
+
+import java.io.Serializable;
+import java.math.BigInteger;
+import java.util.UUID;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+import javax.xml.datatype.XMLGregorianCalendar;
+
+import org.joda.time.DateTime;
+
+import eu.etaxonomy.cdm.api.service.pager.Pager;
+import eu.etaxonomy.cdm.jaxb.DateTimeAdapter;
+
+
+/**
+ * A resumptionToken may have 3 optional attributes
+ *        and can be used in ListSets, ListIdentifiers, ListRecords
+ *        responses.
+ * 
+ * <p>Java class for resumptionTokenType complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="resumptionTokenType">
+ *   &lt;simpleContent>
+ *     &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string">
+ *       &lt;attribute name="expirationDate" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
+ *       &lt;attribute name="completeListSize" type="{http://www.w3.org/2001/XMLSchema}positiveInteger" />
+ *       &lt;attribute name="cursor" type="{http://www.w3.org/2001/XMLSchema}nonNegativeInteger" />
+ *     &lt;/extension>
+ *   &lt;/simpleContent>
+ * &lt;/complexType>
+ * </pre>
+ * 
+ * 
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "resumptionTokenType", propOrder = {
+    "value"
+})
+public class ResumptionToken implements Serializable {
+
+    /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
+       
+    @XmlValue
+    protected String value;
+    @XmlAttribute
+    @XmlJavaTypeAdapter(DateTimeAdapter.class)
+    protected DateTime expirationDate;
+    @XmlAttribute
+    @XmlSchemaType(name = "positiveInteger")
+    protected BigInteger completeListSize;
+    @XmlAttribute
+    @XmlSchemaType(name = "nonNegativeInteger")
+    protected BigInteger cursor;
+    
+    @XmlTransient
+       private MetadataPrefix metadataPrefix;
+    
+    @XmlTransient
+       private DateTime from;
+    
+    @XmlTransient
+       private DateTime until;
+    
+    @XmlTransient
+       private SetSpec set;
+
+    public ResumptionToken(Pager results, DateTime from,
+                       DateTime until, MetadataPrefix metadataPrefix, SetSpec set) {
+               this.from = from;
+               this.until = until;
+               this.metadataPrefix = metadataPrefix;
+               this.set = set;
+               this.value = UUID.randomUUID().toString();
+               this.completeListSize = BigInteger.valueOf(results.getCount());
+               this.cursor = BigInteger.valueOf(results.getPageSize() * results.getCurrentIndex());
+       }
+
+       public ResumptionToken() { }
+
+       /**
+     * Gets the value of the value property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link String }
+     *     
+     */
+    public String getValue() {
+        return value;
+    }
+
+    /**
+     * Sets the value of the value property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link String }
+     *     
+     */
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    /**
+     * Gets the value of the expirationDate property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public DateTime getExpirationDate() {
+        return expirationDate;
+    }
+
+    /**
+     * Sets the value of the expirationDate property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link XMLGregorianCalendar }
+     *     
+     */
+    public void setExpirationDate(DateTime value) {
+        this.expirationDate = value;
+    }
+
+    /**
+     * Gets the value of the completeListSize property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getCompleteListSize() {
+        return completeListSize;
+    }
+
+    /**
+     * Sets the value of the completeListSize property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setCompleteListSize(BigInteger value) {
+        this.completeListSize = value;
+    }
+
+    /**
+     * Gets the value of the cursor property.
+     * 
+     * @return
+     *     possible object is
+     *     {@link BigInteger }
+     *     
+     */
+    public BigInteger getCursor() {
+        return cursor;
+    }
+
+    /**
+     * Sets the value of the cursor property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {@link BigInteger }
+     *     
+     */
+    public void setCursor(BigInteger value) {
+        this.cursor = value;
+    }
+
+       public MetadataPrefix getMetadataPrefix() {
+               return metadataPrefix;
+       }
+
+       public DateTime getFrom() {
+               return from;
+       }
+
+       public DateTime getUntil() {
+               return until;
+       }
+
+       public SetSpec getSet() {
+               return set;
+       }
+       
+       public void updateResults(Pager results) {
+               this.completeListSize = BigInteger.valueOf(results.getCount());
+               this.cursor = BigInteger.valueOf(results.getPageSize() * results.getCurrentIndex());
+       }
+
+       public static ResumptionToken emptyResumptionToken() {
+               return new ResumptionToken();
+       }
+}