org.entityfs.cap.metadata.entity
Interface ECMetadata

All Superinterfaces:
Deletable, EntityCapability, Lockable, RandomlyAccessibleFile, ReadableFile, ReadLockable, ReadWritableFile, ReadWriteLockable, WritableFile, WriteLockable
All Known Implementing Classes:
ECMetadataImpl

public interface ECMetadata
extends EntityCapability, ReadWritableFile

This is a capability for entities that support metadata.

There are two flavors of the metadata capability, ECMetadata (this) and ECNamedMetadata. Metadata-enabled entities usually support both. This capability gives entities one metadata ReadWritableFile.

The locks for this object are the parent entity's locks. When locking this object for reading, for instance, the parent entity is also locked for reading.

When copying metadata enabled entities to another file system, several things can happen. If the target file system is also metadata enabled, the metadata is copied too. If not, the result depends on this file system's metadata capability's MetadataCopyStrategy. If the strategy is MetadataCopyStrategy.IGNORE, no metadata is copied, if the strategy is MetadataCopyStrategy.COPY, the target entity is put in a separate directory along with a file containing the metadata. The created entity layout is such that a metadata enabled file system can be created on it.

The metadata created with this capability object is stored in the named metadata file m and it can be accessed through ECNamedMetadata objects.

Since:
1.0
Author:
Karl Gustafsson
See Also:
ECNamedMetadata, FSCMetadata, ECNamedMetadata, ECMetadataUtil
In_jar:
entityfs-metadata

Field Summary
static String METADATA_FILE_NAME
          The name of the metadata file.
 
Method Summary
 
Methods inherited from interface org.entityfs.cap.EntityCapability
getEntity, isValid
 
Methods inherited from interface org.entityfs.ReadWritableFile
copy, copy, getSizeNoLocking, replaceContents
 
Methods inherited from interface org.entityfs.ReadableFile
getDataSize, getSize, openChannelForRead, openForRead
 
Methods inherited from interface org.entityfs.WritableFile
openChannelForAppend, openChannelForWrite, openForAppend, openForWrite
 
Methods inherited from interface org.entityfs.RandomlyAccessibleFile
openForRandomAccess
 
Methods inherited from interface org.entityfs.lock.ReadLockable
getReadLock, isReadLockedByCurrentThread, lockForReading
 
Methods inherited from interface org.entityfs.lock.WriteLockable
getWriteLock, isWriteLockedByCurrentThread, lockForWriting
 
Methods inherited from interface org.entityfs.Deletable
delete, isDeleted
 

Field Detail

METADATA_FILE_NAME

static final String METADATA_FILE_NAME
The name of the metadata file.

See Also:
Constant Field Values