|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.metadata.iso.MetadataEntity
A superclass for implementing ISO 19115 metadata interfaces. Subclasses must implement at least one of the ISO MetaData interface provided by GeoAPI.
clone()
methodWhile cloneable, this class do not provides the
clone()
operation as part of the public API. The clone operation is
required for the internal working of the unmodifiable()
method, which expect
from clone()
a shalow copy of this metadata entity.
The default implementation of clone()
is suffisient for must uses.
However, subclasses are required to overrides the freeze()
method.
Field Summary | |
protected static java.util.logging.Logger |
LOGGER
The logger for metadata implementation. |
Constructor Summary | |
protected |
MetadataEntity()
Construct a default metadata entity. |
Method Summary | |
protected static void |
appendLineSeparator(java.lang.StringBuffer buffer)
Add a line separator to the given buffer, except if the buffer is empty. |
protected void |
checkWritePermission()
Check if changes in the metadata are allowed. |
protected java.util.Collection |
copyCollection(java.util.Collection source,
java.util.Collection target,
java.lang.Class elementType)
Copy the content of one collection () into an other (). |
protected void |
freeze()
Declare this metadata and all its attributes as unmodifiable. |
boolean |
isModifiable()
Returns if this metadata entity is modifiable. |
protected java.util.Collection |
nonNullCollection(java.util.Collection c,
java.lang.Class elementType)
Returns the specified collection, or a new one if is null. |
MetadataEntity |
unmodifiable()
Returns an unmodifiable copy of this metadata. |
protected static java.lang.Object |
unmodifiable(java.lang.Object object)
Returns an unmodifiable copy of the the specified object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.util.logging.Logger LOGGER
Constructor Detail |
protected MetadataEntity()
Method Detail |
public boolean isModifiable()
unmodifiable()
has been invoked on this object.
public MetadataEntity unmodifiable()
UnsupportedOperationException
. If this metadata is
already unmodifiable, then this method returns .
protected static java.lang.Object unmodifiable(java.lang.Object object)
freeze()
method by subclasses. This method performs the
following heuristic tests:unmodifiable()
is invoked on this object.
object
- The object to convert in an immutable one.
protected void freeze()
unmodifiable()
method. Subclasses should overrides
this method and invokes unmodifiable(Object)
for all attributes.
protected void checkWritePermission() throws java.lang.UnsupportedOperationException
java.lang.UnsupportedOperationException
- if this metadata is unmodifiable.protected final java.util.Collection copyCollection(java.util.Collection source, java.util.Collection target, java.lang.Class elementType)
List
vs Set
)
doesn't matches the type of the source collection, a new target collection is expected.
source
- The source collection.target
- The target collection, or if not yet created.elementType
- The base type of elements to put in the collection.
protected final java.util.Collection nonNullCollection(java.util.Collection c, java.lang.Class elementType)
c
- The collection to checks.elementType
- The element type (used only if is null).
protected static void appendLineSeparator(java.lang.StringBuffer buffer)
Object.toString()
implementations.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |