Fesapi 2.9.0.1
This project provides C++ classes which allow an easy access in import and export to the Energistics standards.
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
epc::ContentType Class Reference

#include <ContentType.h>

Public Member Functions

 ContentType ()
 
 ContentType (bool isAssociatedToAnExt, const std::string &contentType, const std::string &extOrPartName)
 
 ~ContentType ()=default
 
const std::string & getContentTypeString () const
 
const std::string & getExtensionOrPartName () const
 
void setContentTypeString (const std::string &ctString)
 
void setExtensionOrPartName (const std::string &extOrPartName)
 
std::string toString () const
 

Public Attributes

bool isAssociatedToAnExtension
 

Detailed Description

A content type.

Constructor & Destructor Documentation

◆ ContentType() [1/2]

epc::ContentType::ContentType ( )
inline

The part URI grammar is defined as follows: part-URI = 1*( "/" segment ) segment = 1*( pchar ) pchar is defined in RFC 3986

The part URI grammar implies the following constraints. The package implementer shall neither create any part that violates these constraints nor retrieve any data from a package as a part if the purported part URI violates these constraints.

  • A part URI shall not be empty. [Note: The Mx.x notation is discussed in ?2. end note]
  • A part URI shall not have empty segments.
  • A part URI shall start with a forward slash (?/?) character.
  • A part URI shall not have a forward slash as the last character.
  • A segment shall not hold any characters other than pchar characters. Part URI segments have the following additional constraints. The package implementer shall neither create any part with a part URI comprised of a segment that violates these constraints nor retrieve any data from a package as a part if the purported part URI contains a segment that violates these constraints.
  • A segment shall not contain percent-encoded forward slash (?/?), or backward slash (?\?) characters.
  • A segment shall not contain percent-encoded unreserved characters.
  • A segment shall not end with a dot (?.?) character.
  • A segment shall include at least one non-dot character.

◆ ContentType() [2/2]

epc::ContentType::ContentType ( bool isAssociatedToAnExt,
const std::string & contentType,
const std::string & extOrPartName )

Constructor

Parameters
isAssociatedToAnExtTrue if is associated to an extent, false if not.
contentTypeType of the content.
extOrPartNameName of the extent or part.

◆ ~ContentType()

epc::ContentType::~ContentType ( )
default

Destructor

Member Function Documentation

◆ getContentTypeString()

const std::string & epc::ContentType::getContentTypeString ( ) const

GETTTERS

Returns
The content type string.

◆ getExtensionOrPartName()

const std::string & epc::ContentType::getExtensionOrPartName ( ) const

Gets extension or part name

Returns
The extension or part name.

◆ setContentTypeString()

void epc::ContentType::setContentTypeString ( const std::string & ctString)
inline

SETTERS

Parameters
ctStringThe ct string.

◆ setExtensionOrPartName()

void epc::ContentType::setExtensionOrPartName ( const std::string & extOrPartName)
inline

Sets extension or part name

Parameters
extOrPartNameName of the extent or part.

◆ toString()

std::string epc::ContentType::toString ( ) const

Convert this object into a string representation

Returns
A std::string that represents this object.

Member Data Documentation

◆ isAssociatedToAnExtension

bool epc::ContentType::isAssociatedToAnExtension

/ if false, the content type is associated to a part and overrides another content type.


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