func (ec EventContextV1) GetDataSchema() string {
	if ec.DataSchema != nil {
		return ec.DataSchema.String()
	}
	return ""
}
GetDataSchema implements EventContextReader.GetDataSchema
package event
import (
	"fmt"
	"strings"
	"time"
)
func (ec EventContextV1) GetSpecVersion() string {
	return CloudEventsVersionV1
}
func (ec EventContextV1) GetDataContentType() string {
	if ec.DataContentType != nil {
		return *ec.DataContentType
	}
	return ""
}
func (ec EventContextV1) 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 EventContextV1) GetType() string {
	return ec.Type
}
func (ec EventContextV1) GetSource() string {
	return ec.Source.String()
}
func (ec EventContextV1) GetSubject() string {
	if ec.Subject != nil {
		return *ec.Subject
	}
	return ""
}
func (ec EventContextV1) GetTime() time.Time {
	if ec.Time != nil {
		return ec.Time.Time
	}
	return time.Time{}
}
func (ec EventContextV1) GetID() string {
	return ec.ID
}