Project

General

Profile

Task #4397

Design developer API for typed name components

Added by Jeff Burke over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Start date:
12/15/2017
Due date:
% Done:

0%

Estimated time:

Description

Placeholder for typed name component support.

History

#1 Updated by Jeff Thompson over 1 year ago

Following the API for user-specified Data packet type in the MetaInfo, the Java API would be:

/**
 * Get the name component type.
 * @return The name component type enum value. If this is
 * ComponentType.OTHER_CODE, then call getOtherTypeCode() to
 * get the unrecognized component type code.
 */
public final ComponentType getType();

/**
 * Get the component type code from the packet which is other than a
 * recognized ComponentType enum value. This is only meaningful if 
 * getType() is ComponentType.OTHER_CODE.
 * @return The type code.
 */
public final int getOtherTypeCode();

/**
 * Create a Name.Component of the given type, using the existing the Blob
 * value.
 * (To create an ImplicitSha256Digest component, use fromImplicitSha256Digest.)
 * @param value The component value. value may not be null, but value.buf()
 * may be null.
 * @param type The component type enum value. If the name component type is
 * not a recognized ComponentType enum value, call
 * Name.Component(value, ComponentType.OTHER_CODE, otherTypeCode).
 */
public Component(Blob value, ComponentType type);

/**
 * Create a Name.Component of the given type, using the existing the Blob
 * value.
 * (To create an ImplicitSha256Digest component, use fromImplicitSha256Digest.)
 * @param value The component value. value may not be null, but value.buf()
 * may be null.
 * @param type The component type enum value. If name component type is not
 * a recognized ComponentType enum value, then set this to
 * ComponentType.OTHER_CODE and use the otherTypeCode parameter.
 * @param otherTypeCode If type is ComponentType.OTHER_CODE,
 * then this is the packet's unrecognized content type code, which must be
 * non-negative.
 */
public Component(Blob value, ComponentType type, int otherTypeCode);

#2 Updated by Jeff Thompson about 1 year ago

  • Status changed from New to Closed

Changes merged to master for all libraries.

Also available in: Atom PDF