/* * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2008 - 2009, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotoolkit.sml.xml.v101; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlID; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.geotoolkit.sml.xml.AbstractRights; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * <complexType> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * <element ref="{http://www.opengis.net/sensorML/1.0.1}documentation"/> * </sequence> * <attribute ref="{http://www.opengis.net/gml}id"/> * <attribute name="privacyAct" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * <attribute name="intellectualPropertyRights" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * <attribute name="copyRights" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * </restriction> * </complexContent> * </complexType> * </pre> * * * @module */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "documentation" }) @XmlRootElement(name = "Rights") public class Rights extends SensorObject implements AbstractRights { @XmlElement(required = true) private Documentation documentation; @XmlAttribute(namespace = "http://www.opengis.net/gml") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") private String id; @XmlAttribute private Boolean privacyAct; @XmlAttribute private Boolean intellectualPropertyRights; @XmlAttribute private Boolean copyRights; public Rights() { } public Rights(final AbstractRights r) { if (r != null) { this.copyRights = r.isCopyRights(); this.privacyAct = r.isPrivacyAct(); this.id = r.getId(); this.intellectualPropertyRights = r.isIntellectualPropertyRights(); if (r.getDocumentation() != null) { this.documentation = new Documentation(r.getDocumentation()); } } } public Rights(final Boolean copyRights, final Boolean privacyAct, final Documentation docu) { this.copyRights = copyRights; this.privacyAct = privacyAct; this.documentation = docu; } /** * Gets the value of the documentation property. * * @return * possible object is * {@link Documentation } * */ public Documentation getDocumentation() { return documentation; } /** * Sets the value of the documentation property. * * @param value * allowed object is * {@link Documentation } * */ public void setDocumentation(final Documentation value) { this.documentation = value; } /** * Gets the value of the id property. * * @return * possible object is * {@link String } * */ public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(final String value) { this.id = value; } /** * Gets the value of the privacyAct property. * * @return * possible object is * {@link Boolean } * */ public Boolean isPrivacyAct() { return privacyAct; } /** * Sets the value of the privacyAct property. * * @param value * allowed object is * {@link Boolean } * */ public void setPrivacyAct(final Boolean value) { this.privacyAct = value; } /** * Gets the value of the intellectualPropertyRights property. * * @return * possible object is * {@link Boolean } * */ public Boolean isIntellectualPropertyRights() { return intellectualPropertyRights; } /** * Sets the value of the intellectualPropertyRights property. * * @param value * allowed object is * {@link Boolean } * */ public void setIntellectualPropertyRights(final Boolean value) { this.intellectualPropertyRights = value; } /** * Gets the value of the copyRights property. * * @return * possible object is * {@link Boolean } * */ public Boolean isCopyRights() { return copyRights; } /** * Sets the value of the copyRights property. * * @param value * allowed object is * {@link Boolean } * */ public void setCopyRights(final Boolean value) { this.copyRights = value; } }