CPD Results

The following document contains the results of PMD's CPD 4.3.

Duplications

FileLine
org/deegree/observation/persistence/contsql/jaxb/ContinuousObservationStore.java255
org/deegree/observation/persistence/simplesql/jaxb/SimpleObservationStore.java217
            property = new ArrayList<ContinuousObservationStore.Property>();
        }
        return this.property;
    }

    /**
     * Gets the value of the configVersion property.
     * 
     * @return
     *     possible object is
     *     {@link String }
     *     
     */
    public String getConfigVersion() {
        if (configVersion == null) {
            return "3.0.0";
        } else {
            return configVersion;
        }
    }

    /**
     * Sets the value of the configVersion property.
     * 
     * @param value
     *     allowed object is
     *     {@link String }
     *     
     */
    public void setConfigVersion(String value) {
        this.configVersion = value;
    }


    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="Column" type="{http://www.deegree.org/datasource/observation/contsql}ColumnType"/>
     *         &lt;element name="Option" type="{http://www.deegree.org/datasource/observation/contsql}OptionType" maxOccurs="unbounded"/>
     *       &lt;/sequence>
     *       &lt;attribute name="href" type="{http://www.w3.org/2001/XMLSchema}string" />
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "column",
        "option"
    })
    public static class Property {

        @XmlElement(name = "Column", required = true)
        protected ColumnType column;
        @XmlElement(name = "Option", required = true)
        protected List<OptionType> option;
        @XmlAttribute(name = "href")
        protected String href;

        /**
         * Gets the value of the column property.
         * 
         * @return
         *     possible object is
         *     {@link ColumnType }
         *     
         */
        public ColumnType getColumn() {
            return column;
        }

        /**
         * Sets the value of the column property.
         * 
         * @param value
         *     allowed object is
         *     {@link ColumnType }
         *     
         */
        public void setColumn(ColumnType value) {
            this.column = value;
        }

        /**
         * Gets the value of the option property.
         * 
         * <p>
         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a <CODE>set</CODE> method for the option property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getOption().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link OptionType }
         * 
         * 
         */
        public List<OptionType> getOption() {
            if (option == null) {
                option = new ArrayList<OptionType>();
            }
            return this.option;
        }

        /**
         * Gets the value of the href property.
         * 
         * @return
         *     possible object is
         *     {@link String }
         *     
         */
        public String getHref() {
            return href;
        }

        /**
         * Sets the value of the href property.
         * 
         * @param value
         *     allowed object is
         *     {@link String }
         *     
         */
        public void setHref(String value) {
            this.href = value;
        }

    }
FileLine
org/deegree/observation/persistence/continuous/ContinuousObservationDatastore.java145
org/deegree/observation/persistence/simple/SimpleObservationDatastore.java168
            columns.add( idColumn );
            stmt = getStatement( filter, columns, conn, offering );
            resultSet = stmt.executeQuery();

            // Calendar template = Calendar.getInstance( TimeZone.getTimeZone( "GMT" ) );
            List<Result> results = new ArrayList<Result>( properties.size() );
            while ( resultSet.next() ) {
                results.clear();
                for ( Property property : properties ) {
                    double value = resultSet.getDouble( property.getColumnName() );
                    if ( resultSet.wasNull() ) {
                        value = Double.NaN;
                    }
                    results.add( new SimpleDoubleResult( value, property ) );
                }