org.geotoolkit.metadata.iso.constraint
Class DefaultLegalConstraints

Object
  extended by AbstractMetadata
      extended by ModifiableMetadata
          extended by MetadataEntity
              extended by DefaultConstraints
                  extended by DefaultLegalConstraints
All Implemented Interfaces:
Serializable, Cloneable, LenientComparable, IdentifiedObject, Constraints, LegalConstraints

@ThreadSafe
public class DefaultLegalConstraints
extends DefaultConstraints
implements LegalConstraints

Restrictions and legal prerequisites for accessing and using the resource.

Since:
2.1
Version:
3.19
Author:
Martin Desruisseaux (IRD, Geomatys), Touraïvane (IRD), Cédric Briançon (Geomatys)
See Also:
Serialized Form
Module:
metadata/geotk-metadata (download)    View source code for this class

Field Summary
 
Fields inherited from class MetadataEntity
identifiers
 
Fields inherited from class AbstractMetadata
LOGGER
 
Constructor Summary
DefaultLegalConstraints()
          Constructs an initially empty constraints.
DefaultLegalConstraints(CharSequence useLimitation)
          Constructs a new constraints with the given use limitation.
DefaultLegalConstraints(LegalConstraints source)
          Constructs a metadata entity initialized with the values from the specified metadata.
 
Method Summary
static DefaultLegalConstraints castOrCopy(LegalConstraints object)
          Returns a Geotk metadata implementation with the same values than the given arbitrary implementation.
 Collection<Restriction> getAccessConstraints()
          Returns the access constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations on obtaining the resource.
 Collection<InternationalString> getOtherConstraints()
          Returns the other restrictions and legal prerequisites for accessing and using the resource.
 Collection<Restriction> getUseConstraints()
          Returns the constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations or warnings on using the resource.
 void setAccessConstraints(Collection<? extends Restriction> newValues)
          Sets the access constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations on obtaining the resource.
 void setOtherConstraints(Collection<? extends InternationalString> newValues)
          Sets the other restrictions and legal prerequisites for accessing and using the resource.
 void setUseConstraints(Collection<? extends Restriction> newValues)
          Sets the constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations or warnings on using the resource.
 
Methods inherited from class DefaultConstraints
castOrCopy, getUseLimitations, setUseLimitations
 
Methods inherited from class MetadataEntity
getIdentifier, getIdentifierMap, getIdentifiers, getStandard
 
Methods inherited from class ModifiableMetadata
checkWritePermission, clone, collectionType, copyCollection, copyList, copySet, freeze, isModifiable, nonNullCollection, nonNullList, nonNullSet, prune, unmodifiable
 
Methods inherited from class AbstractMetadata
asMap, asTree, asTreeTable, equals, equals, getInterface, hashCode, isEmpty, parse, toString
 
Methods inherited from class Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Constraints
getUseLimitations
 

Constructor Detail

DefaultLegalConstraints

public DefaultLegalConstraints()
Constructs an initially empty constraints.


DefaultLegalConstraints

public DefaultLegalConstraints(CharSequence useLimitation)
Constructs a new constraints with the given use limitation.

Parameters:
useLimitation - The use limitation, or null if none.
Since:
3.20

DefaultLegalConstraints

public DefaultLegalConstraints(LegalConstraints source)
Constructs a metadata entity initialized with the values from the specified metadata.

Parameters:
source - The metadata to copy, or null if none.
Since:
2.4
Method Detail

castOrCopy

public static DefaultLegalConstraints castOrCopy(LegalConstraints object)
Returns a Geotk metadata implementation with the same values than the given arbitrary implementation. If the given object is null, then this method returns null. Otherwise if the given object is already a Geotk implementation, then the given object is returned unchanged. Otherwise a new Geotk implementation is created and initialized to the attribute values of the given object, using a shallow copy operation (i.e. attributes are not cloned).

Parameters:
object - The object to get as a Geotk implementation, or null if none.
Returns:
A Geotk implementation containing the values of the given object (may be the given object itself), or null if the argument was null.
Since:
3.18

getAccessConstraints

public Collection<Restriction> getAccessConstraints()
Returns the access constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations on obtaining the resource.

Specified by:
getAccessConstraints in interface LegalConstraints

setAccessConstraints

public void setAccessConstraints(Collection<? extends Restriction> newValues)
Sets the access constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations on obtaining the resource.

Parameters:
newValues - The new access constraints.

getUseConstraints

public Collection<Restriction> getUseConstraints()
Returns the constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations or warnings on using the resource.

Specified by:
getUseConstraints in interface LegalConstraints

setUseConstraints

public void setUseConstraints(Collection<? extends Restriction> newValues)
Sets the constraints applied to assure the protection of privacy or intellectual property, and any special restrictions or limitations or warnings on using the resource.

Parameters:
newValues - The new use constraints.

getOtherConstraints

public Collection<InternationalString> getOtherConstraints()
Returns the other restrictions and legal prerequisites for accessing and using the resource. This method should returns a non-empty value only if access constraints or use constraints declares other restrictions.

Specified by:
getOtherConstraints in interface LegalConstraints

setOtherConstraints

public void setOtherConstraints(Collection<? extends InternationalString> newValues)
Sets the other restrictions and legal prerequisites for accessing and using the resource.

Parameters:
newValues - Other constraints.


Copyright © 2009-2012 Geotoolkit.org. All Rights Reserved.