func (ec EventContextV03) DeprecatedGetDataContentEncoding() string {
	if ec.DataContentEncoding != nil {
		return *ec.DataContentEncoding
	}
	return ""
}
DeprecatedGetDataContentEncoding implements EventContextReader.DeprecatedGetDataContentEncoding
package event
import (
	"fmt"
	"strings"
	"time"
)
func (ec EventContextV03) GetSpecVersion() string {
	return CloudEventsVersionV03
}
func (ec EventContextV03) GetDataContentType() string {
	if ec.DataContentType != nil {
		return *ec.DataContentType
	}
	return ""
}
func (ec EventContextV03) GetDataMediaType() (string, error) {
	if ec.DataContentType != nil {
		dct := *ec.DataContentType
		i := strings.IndexRune(dct, ';')
		if i == -1 {
			return dct, nil
		}
		return strings.TrimSpace(dct[0:i]), nil
	}
	return "", nil
}
func (ec EventContextV03) GetType() string {
	return ec.Type
}
func (ec EventContextV03) GetSource() string {
	return ec.Source.String()
}
func (ec EventContextV03) GetSubject() string {
	if ec.Subject != nil {
		return *ec.Subject
	}
	return ""
}
func (ec EventContextV03) GetTime() time.Time {
	if ec.Time != nil {
		return ec.Time.Time
	}
	return time.Time{}
}
func (ec EventContextV03) GetID() string {
	return ec.ID
}
func (ec EventContextV03) GetDataSchema() string {
	if ec.SchemaURL != nil {
		return ec.SchemaURL.String()
	}
	return ""
}