org.ccnx.ccn.profiles.metadata.MetadataProfile Class Reference

Includes routines to find correct version of a metadata file based on its base file. More...

Inheritance diagram for org.ccnx.ccn.profiles.metadata.MetadataProfile:

org.ccnx.ccn.profiles.CCNProfile

List of all members.

Static Public Member Functions

static ContentName metadataName (ContentName baseName)
 Get a standard metadata path for a base file.
static ContentName getLatestVersion (ContentName baseName, ContentName metaName, long timeout, CCNHandle handle) throws IOException
 Get the latest version of a metadata file which is associated with a base file.
static ContentName getLatestVersion (ContentName baseName, MetaNamer namer, ArrayList< byte[]> metaName, long timeout, CCNHandle handle) throws IOException
 This call requires the calling function to check for a terminal version before attempting to retrieve the metadata content.
static boolean isHeader (ContentName baseName, ContentName headerName)
 Check to see if we have (a block of) the header.
static boolean isHeader (ContentName potentialHeaderName)
 Slightly more heuristic isHeader; looks to see if this is a segment of something that ends in the header name (and version), without knowing the prefix.
static ContentName headerName (ContentName name)
 Move header from <content>/<version> as its name to <content>/<version>/_metadata_marker_/HEADER/<version> where the second version is imposed by the use of versioning network objects (i.e.
static ContentName oldHeaderName (ContentName name)

Static Public Attributes

static final String METADATA_NAMESPACE = "META"
static final CommandMarker METADATA_MARKER
static final byte[] OLD_METADATA_NAMESPACE
static final byte[] HEADER_NAME = ContentName.componentParseNative(".header")

Classes

class  LocalMetaNamer
 General getter for generic metadata.
interface  MetaNamer
 This interface allows getLatestVersion of metadata within one of the supported meta namespaces. More...


Detailed Description

Includes routines to find correct version of a metadata file based on its base file.

Member Function Documentation

static ContentName org.ccnx.ccn.profiles.metadata.MetadataProfile.metadataName ( ContentName  baseName  )  [static]

Get a standard metadata path for a base file.

Parameters:
baseName the base file
Returns:
metadata path for base file

static ContentName org.ccnx.ccn.profiles.metadata.MetadataProfile.getLatestVersion ( ContentName  baseName,
ContentName  metaName,
long  timeout,
CCNHandle  handle 
) throws IOException [static]

Get the latest version of a metadata file which is associated with a base file.

Before searching for the metadata version, we find the latest version of the base file. This call requires the calling function to check for a terminal version before attempting to retrieve the metadata content. If the base file name does not have a version, this function will return null. If the metadata file for the latest version of the base file does not exist, this function will return a content name without a terminal version.

Example where both versions are found: baseName/version/metadataMarkers/version

Example where only the base file name version is found: baseName/version/metadataMarkers

Example where no base file version is found: null

Parameters:
baseName the base file
metaName the meta file. This should be a ContentName containing only the relative path from the base file.
timeout time to search for the latest version in ms. Applies separately to each latest version search.
handle CCNHandle to use for search.
Returns:
Exceptions:
IOException 

static ContentName org.ccnx.ccn.profiles.metadata.MetadataProfile.getLatestVersion ( ContentName  baseName,
MetaNamer  namer,
ArrayList< byte[]>  metaName,
long  timeout,
CCNHandle  handle 
) throws IOException [static]

This call requires the calling function to check for a terminal version before attempting to retrieve the metadata content.

If the base file name does not have a version, this function will return null. If the metadata file for the latest version of the base file does not exist, this function will return a content name without a terminal version.

Example where both versions are found: baseName/version/metadataMarkers/version

Example where only the base file name version is found: baseName/version/metadataMarkers

Example where no base file version is found: null

Parameters:
baseName 
namer 
metaName 
timeout 
handle 
Returns:
Exceptions:
IOException 

static boolean org.ccnx.ccn.profiles.metadata.MetadataProfile.isHeader ( ContentName  baseName,
ContentName  headerName 
) [static]

Check to see if we have (a block of) the header.

Headers are also versioned.

Parameters:
baseName The name of the object whose header we are looking for (including version, but not including segmentation information).
headerName The name of the object we think might be a header block (can include segmentation).
Returns:

static boolean org.ccnx.ccn.profiles.metadata.MetadataProfile.isHeader ( ContentName  potentialHeaderName  )  [static]

Slightly more heuristic isHeader; looks to see if this is a segment of something that ends in the header name (and version), without knowing the prefix.

static ContentName org.ccnx.ccn.profiles.metadata.MetadataProfile.headerName ( ContentName  name  )  [static]

Move header from <content>/<version> as its name to <content>/<version>/_metadata_marker_/HEADER/<version> where the second version is imposed by the use of versioning network objects (i.e.

this function should return up through HEADER above) Header name generation may want to move to a MetadataProfile.

Parameters:
name 
Returns:


Member Data Documentation

final CommandMarker org.ccnx.ccn.profiles.metadata.MetadataProfile.METADATA_MARKER [static]

Initial value:

 
                CommandMarker.commandMarker(METADATA_NAMESPACE, "M")

final byte [] org.ccnx.ccn.profiles.metadata.MetadataProfile.OLD_METADATA_NAMESPACE [static]

Initial value:

 
                (CCNProfile.MARKER + "meta" + CCNProfile.MARKER).getBytes()


The documentation for this class was generated from the following file:

Generated on Thu Feb 16 00:45:03 2012 for Content-Centric Networking in Java by  doxygen 1.5.6