// GetAnchorOrigin returns anchor origin from document metadata.
GetAnchorOrigin returns anchor origin from document metadata.
// GetAnchorOrigin returns anchor origin from document metadata .
func GetAnchorOrigin(metadata document.Metadata) (string, error) {
	methodMeta, err := GetMethodMetadata(metadata)
	if err != nil {
		return "", err
	}
	anchorOriginObj, ok := methodMeta[document.AnchorOriginProperty]
	if !ok {
		return "", fmt.Errorf("missing anchor origin property in method metadata")
	}
	anchorOrigin, ok := anchorOriginObj.(string)
	if !ok {
		return "", fmt.Errorf("anchor origin property is not a string")
	}
	return anchorOrigin, nil
}
func GetAnchorOrigin ( metadata document . Metadata ) ( string , error ) { methodMeta , err := GetMethodMetadata ( metadata ) if err != nil { return " " , err } anchorOriginObj , ok := methodMeta [ document . AnchorOriginProperty ] if ! ok { return " " , fmt . Errorf ( " " ) } anchorOrigin , ok := anchorOriginObj . ( string ) if ! ok { return " " , fmt . Errorf ( " " ) } return anchorOrigin , nil }
GetAnchorOrigin returns anchor origin from document metadata.
GetAnchorOrigin returns anchor origin from document metadata .