|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ECNamedMetadata
This is a capability for entities that support metadata.
There are two flavors of the metadata capability, ECMetadata
and
ECNamedMetadata
(this). Metadata-enabled entities usually support
both. Entities that support this capability act as a directory for metadata
files (ReadWritableFile
:s, not file entities).
The parent entity's lock is used for locking all metadata files too. When locking a metadata file 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.
FSCMetadata
,
ECMetadata
,
ECNamedMetadataUtil
Method Summary | |
---|---|
void |
deleteMetadataFile(String name)
Delete the named metadata file. |
ReadWritableFile |
getMetadataFile(String name)
Get the named metadata file. |
Set<String> |
getMetadataFileNames()
Get a set containing all metadata file names for the entity. |
boolean |
hasMetadataFile(String name)
Check if the entity has a metadata file with the supplied name. |
ReadWritableFile |
newMetadataFile(String name)
Create a new metadata file. |
Methods inherited from interface org.entityfs.cap.EntityCapability |
---|
getEntity, isValid |
Method Detail |
---|
Set<String> getMetadataFileNames()
null
.boolean hasMetadataFile(String name)
name
- The name of the metadata file to look for. This name is
case-sensitive.
true
if the entity has a metadata file with the supplied
name, false
if not.ReadWritableFile getMetadataFile(String name) throws EntityNotFoundException
name
- The name of the metadata file. This must be a valid file name
in the backing file system.
EntityNotFoundException
- If no metadata file with the supplied
name exists for the entity.ReadWritableFile newMetadataFile(String name) throws EntityFoundException, ReadOnlyException
name
- The name of the metadata file. This must be a valid file name
in the backing file system.
EntityFoundException
- If the entity already has a metadata file
with the supplied name.
ReadOnlyException
- If the file system is read only.void deleteMetadataFile(String name) throws EntityNotFoundException, ReadOnlyException
name
- The name of the metadata file.
EntityNotFoundException
- If no such metadata file exists.
ReadOnlyException
- If the file system is read only.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |