public abstract class MetadataNode extends Object
RootNode
|
--- TITLE - String("Best Movie Ever")
|
--- CREW - MetadataNode
|
--- MAIN_ACTOR - String("Joe Sixpack")
|
--- MAIN_ACTOR2 - String("Doris Dosenkohl")
|
--- SYNOPSIS - String("Don't know - I fell asleep after 5 seconds")
It is possible to get Metadata from other MetadataNodes directly by
concatenating the different identifiers using # to separate them.
The MetadataNode represents the current snapshot of metadata associated
with a network entity as cached on the local device. This may or may not
reflect an accurate or complete view of the metadata that exists on the
network. It is the responsibility of the application to explicitly update
metadata using the home network APIs
(e.g. ContentServerNetModule.requestSearchEntries(String,
String, int, int, String, String, org.ocap.hn.NetActionHandler)
| Constructor and Description |
|---|
MetadataNode() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
addMetadata(String key,
Object value)
Adds a new metadata entry to this MetadataNode or modifies an existing
metadata entry in this MetadataNode.
|
abstract void |
addMetadata(String key,
Object value,
org.ocap.storage.ExtendedFileAccessPermissions efap)
Adds a new metadata entry to this MetadataNode or modifies an existing
metadata entry in this MetadataNode.
|
abstract void |
addNameSpace(String namespace,
String URI)
Adds a namespace definition to this MetadataNode.
|
static MetadataNode |
createMetadataNode(String key)
Creates an instance of a MetadataNode object.
|
abstract org.ocap.storage.ExtendedFileAccessPermissions |
getExtendedFileAccessPermissions(String key)
Gets the extended file access permissions for a property.
|
abstract String |
getKey()
Gets the key string which can be utilized to retrieve this MetadataNode
from this node's parent.
|
abstract String[] |
getKeys()
Gets the set of keys for all metadata contained within this
MetadataNode.
|
abstract Enumeration |
getMetadata()
Gets an Enumeration of all metadata objects in this node.
|
abstract Object |
getMetadata(String key)
Returns the Metadata for the specified key.
|
abstract MetadataNode |
getParentNode()
Gets the parent node of this MetadataNode.
|
public static MetadataNode createMetadataNode(String key)
key - the key for locating this MetadataNodepublic abstract Object getMetadata(String key)
key - The key to search for.SecurityException - if the calling application does not have
extended file access permission to read from the property
represented by the key parameter.public abstract void addMetadata(String key, Object value)
ExtendedFileAccessPermissions that matches that of
the parent ContentEntry.key - The key e.g. "TITLE". When the value type is
MetadataNode the implementation SHALL over-write the
key set by the createMetadataNode method
with the value of this parameter.value - The value associated with the key, e.g.
"When Harry Meets Sally" or a more complex Object like another
MetadataNode.IllegalArgumentException - if value is not a known mappable object
type, or if the key parameter contains an unknown vendor defined
namespace .SecurityException - if the property identified by the key
parameter does not exist and the calling application does not have
sufficient file access permissions to write to the
ContentEntry containing this MetadataNode.SecurityException - if the property identified by the key
parameter does exist and the calling application does not have
sufficient file access permissions to write to the
the property.addNameSpace(String namespace, String URI)public abstract void addMetadata(String key, Object value, org.ocap.storage.ExtendedFileAccessPermissions efap)
ExtendedFileAccessPermissions that matches the
efap parameter.key - The key e.g. "TITLE". When the value type is
MetadataNode the implementation SHALL over-write the
key set by the createMetadataNode method
with the value of this parameter.value - The value associated with the key, e.g.
"When Harry Meets Sally" or a more complex Object like another
MetadataNode.efap - ExtendedFileAccessPermissions for the property or
properties added or modified by this method.IllegalArgumentException - if value is not a known mappable object
type, or if the key parameter contains an unknown vendor defined
namespace, or if the efap parameter is null.SecurityException - if the property identified by the key
parameter does not exist and the calling application does not have
sufficient file access permissions to write to the
ContentEntry containing this MetadataNode.SecurityException - if the property identified by the key
parameter does exist and the calling application does not have
sufficient file access permissions to write to the
the property.addNameSpace(String namespace, String URI)public abstract void addNameSpace(String namespace, String URI)
namespace - String identifier of the namespace to be addedURI - vendor specific String based universal resource indicator
pointing to the definition of this namespace.addMetadata(String key,Object value)public abstract Enumeration getMetadata()
public abstract MetadataNode getParentNode()
public abstract String getKey()
public abstract String[] getKeys()
public abstract org.ocap.storage.ExtendedFileAccessPermissions getExtendedFileAccessPermissions(String key)
key - The key value representing the property to get the
permissions for.Copyright © 2012 CableLabs. All Rights Reserved.